예제 #1
0
 public static void EqualsTest(sbyte i1, object obj, bool expected)
 {
     if (obj is sbyte)
     {
         sbyte i2 = (sbyte)obj;
         Assert.Equal(expected, i1.Equals(i2));
         Assert.Equal(expected, i1.GetHashCode().Equals(i2.GetHashCode()));
     }
     Assert.Equal(expected, i1.Equals(obj));
 }
 public void EstablecerSByte(IImplementacion impl, IPropiedad propiedad, sbyte valor, sbyte valorInicial)
 {
     if (!valorInicial.Equals(valor))
     {
         RegistrarEstablecer(FabricaEstado.Crear(impl, propiedad, valorInicial));
     }
 }
예제 #3
0
        public FrmDialogCustom(string content, string[] choiceName)
        {
            InitializeComponent();
            lblContent.Text = content;
            var sizeXButton = (new Button().Size.Width);

            RefreshSizeControls((choiceName.Length + 2) * sizeXButton);
            var startPoint = this.Size.Width / 2 - (sizeXButton * (choiceName.Length + 1) / 2) - 15;

            for (sbyte i = 0; i <= choiceName.Length; i++)
            {
                var newButton = new Button();
                if (i.Equals((sbyte)choiceName.Length))
                {
                    newButton.Text     = "Hủy bỏ";
                    newButton.TabIndex = 0;
                }
                else
                {
                    newButton.Text     = choiceName[i];
                    newButton.TabIndex = i + 1;
                }
                newButton.Click += (s, e) =>
                {
                    ReturnResult((sbyte)newButton.TabIndex);
                };
                newButton.Location = new Point(startPoint + (newButton.Size.Width * i), grpButton.Size.Height / 2 - newButton.Size.Height / 2);
                grpButton.Controls.Add(newButton);
            }
        }
예제 #4
0
        public bool Equals(ObscuredSByte obj)
        {
            if (currentCryptoKey == obj.currentCryptoKey)
            {
                return(hiddenValue.Equals(obj.hiddenValue));
            }

            return(Decrypt(hiddenValue, currentCryptoKey).Equals(Decrypt(obj.hiddenValue, obj.currentCryptoKey)));
        }
예제 #5
0
        public static sbyte?ToSbyteNullable(object val)
        {
            sbyte num = ToSbyte(val);

            if (num.Equals((sbyte)0))
            {
                return(null);
            }
            return(new sbyte?(num));
        }
예제 #6
0
        public override object Get(int record)
        {
            sbyte num = this.values[record];

            if (!num.Equals((sbyte)0))
            {
                return(num);
            }
            return(base.GetBits(record));
        }
예제 #7
0
        public override object Get(int record)
        {
            sbyte value = _values[record];

            if (!value.Equals(defaultValue))
            {
                return(value);
            }
            return(GetBits(record));
        }
예제 #8
0
파일: ReaderAPI.cs 프로젝트: Jitlee/LPS
        public bool GetDebugOutputState(ref bool bActiveState)
        {
            sbyte b_retv = m_clsRFReader.GetDebugOutputState();

            if (b_retv.Equals(87))
            {
                return(false);
            }
            bActiveState = b_retv == 1;
            return(true);
        }
예제 #9
0
        public bool CheckValueEquals(RVariant variant, sbyte val)
        {
            Assert.AreEqual(RVariantKind.Value, variant.Kind);
            List <bool> res = new List <bool>();

            // Operator ==
            res.Add(variant == (RVariant)val);
            res.Add((RVariant)val == variant);
            res.Add((sbyte)variant == val);
            res.Add(val == (sbyte)variant);
            // Operator !=
            res.Add(!(variant != (RVariant)val));
            res.Add(!((RVariant)val != variant));
            res.Add(!((sbyte)variant != val));
            res.Add(!(val != (sbyte)variant));
            // Method Equals
            res.Add(variant.Equals((RVariant)val));
            res.Add(variant.Equals((object)val));
            res.Add(val.Equals(variant));                // must be cast to sbyte, not passed as an object
            Assert.IsFalse(val.Equals((object)variant)); // comparing sbyte to non-boxed object is always false
            // Done - see if all values were equal
            return(BoolResultsIfConsistent(res));
        }
예제 #10
0
파일: ReaderAPI.cs 프로젝트: Jitlee/LPS
        public bool OpenComm(String strCommDevice, byte byAutodetect, uint dwBaudRate, byte byProtocol)
        {
            CommSettings tCommSet = new CommSettings();

            tCommSet.baudrate = dwBaudRate;
            tCommSet.protocol = (sbyte)byProtocol;
            sbyte b_retv = m_clsRFReader.OpenComm(strCommDevice, byAutodetect, tCommSet);

            if (b_retv.Equals(1))
            {
                return(true);
            }
            return(false);
        }
예제 #11
0
            public override bool Equals(object obj)
            {
                if (obj == this)
                {
                    return(true);
                }
                if (!(obj is Item))
                {
                    return(false);
                }
                var other = (Item)obj;

                return((other._sbyte == _sbyte) && _sbyteWrapper.Equals(other._sbyteWrapper
                                                                        ));
            }
예제 #12
0
        public override int Compare(int recordNo1, int recordNo2)
        {
            sbyte num3 = this.values[recordNo1];
            sbyte num2 = this.values[recordNo2];

            if (num3.Equals((sbyte)0) || num2.Equals((sbyte)0))
            {
                int num = base.CompareBits(recordNo1, recordNo2);
                if (num != 0)
                {
                    return(num);
                }
            }
            return(num3.CompareTo(num2));
        }
예제 #13
0
        public override int Compare(int recordNo1, int recordNo2)
        {
            sbyte valueNo1 = _values[recordNo1];
            sbyte valueNo2 = _values[recordNo2];

            if (valueNo1.Equals(defaultValue) || valueNo2.Equals(defaultValue))
            {
                int bitCheck = CompareBits(recordNo1, recordNo2);
                if (0 != bitCheck)
                {
                    return(bitCheck);
                }
            }
            return(valueNo1.CompareTo(valueNo2));
            //return(valueNo1 - valueNo2); // copied from SByte.CompareTo(SByte)
        }
예제 #14
0
    public static void Main()
    {
        char[] number        = Console.ReadLine().TrimStart(new char[] { '0' }).ToCharArray();
        char[] multiplicator = Console.ReadLine().ToCharArray();

        StringBuilder result = new StringBuilder();

        int reminder = 0;

        for (int i = 0; i < multiplicator.Length; i++)
        {
            for (int k = number.Length - 1; k >= 0; k--)
            {
                sbyte currMultiplicator = sbyte.Parse(multiplicator[i].ToString());
                sbyte currNumber        = sbyte.Parse(number[k].ToString());

                if (currMultiplicator.Equals(0))
                {
                    result.Append(0);
                    break;
                }

                if ((currNumber * currMultiplicator) + reminder >= 10)
                {
                    int currResult = ((currNumber * currMultiplicator) + reminder) % 10;
                    result.Append(currResult);
                    reminder = ((currNumber * currMultiplicator) + reminder) / 10;
                }
                else
                {
                    int currentResult = (currNumber * currMultiplicator) + reminder;
                    reminder = 0;
                    result.Append(currentResult);
                }
            }
            if (reminder != 0)
            {
                result.Append(reminder);
            }
        }

        char[] endResult = result.ToString().ToCharArray();
        Array.Reverse(endResult);

        Console.WriteLine(string.Join("", endResult));
    }
예제 #15
0
        /// <summary>
        /// Compares this object to the specified object.
        /// </summary>
        /// <param name="obj">the object to compare with
        /// </param><returns>true if the objects are the same; false otherwise.
        /// </returns>
        public override bool equals(Object obj)
        {
            // testing another object reference for a NULL value
            if (obj == null)
            {
                return(false);
            }

            // testing object class equality
            if (GetType() != obj.GetType())
            {
                return(false);
            }

            // testing object fields equality
            return(v.Equals((obj as Byte).v));
        }
예제 #16
0
        //显示
        public void ShowUnPacker(CT2UnPacker lpUnPack)
        {
            int count = lpUnPack.GetDatasetCount();

            for (int k = 0; k < count; k++)
            {
                Debug.Print(string.Format("第[{0}]个数据集", k));
                lpUnPack.SetCurrentDatasetByIndex(k);
                String strInfo = string.Format("记录行数:           {0}", lpUnPack.GetRowCount());
                Debug.Print(strInfo);
                strInfo = string.Format("列行数:			 {0}", lpUnPack.GetColCount());
                Debug.Print(strInfo);
                while (lpUnPack.IsEOF() == 0)
                {
                    for (int i = 0; i < lpUnPack.GetColCount(); i++)
                    {
                        String colName = lpUnPack.GetColName(i);
                        sbyte  colType = lpUnPack.GetColType(i);
                        if (!colType.Equals('R'))
                        {
                            String colValue = lpUnPack.GetStrByIndex(i);
                            String str      = string.Format("{0}:			[{1}]", colName, colValue);
                            Debug.Print(str);
                        }
                        else
                        {
                            int colLength = 0;
                            unsafe
                            {
                                void * colValue = (char *)lpUnPack.GetRawByIndex(i, &colLength);
                                string str      = string.Format("{0}:			[{1}]({2})", colName, Marshal.PtrToStringAuto(new IntPtr(colValue)), colLength);
                            }
                        }
                    }
                    lpUnPack.Next();
                }
            }
        }
예제 #17
0
    public bool PosTest2()
    {
        bool retVal = true;

        TestLibrary.TestFramework.BeginScenario("PosTest2: The object compare to the SByte minValue");
        try
        {
            object objVal      = SByte.MinValue;
            sbyte  sourceSByte = sbyte.MinValue;
            bool   retbool     = sourceSByte.Equals(objVal);
            if (!retbool)
            {
                TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
                retVal = false;
            }
        }
        catch (Exception e)
        {
            TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
            retVal = false;
        }
        return(retVal);
    }
예제 #18
0
    public bool PosTest2()
    {
        bool retVal = true;

        TestLibrary.TestFramework.BeginScenario("PosTest2: The sbyte equals SByte minValue");
        try
        {
            sbyte desSByte    = SByte.MinValue;
            sbyte sourceSByte = (sbyte)(this.GetInt32(0, 127) + this.GetInt32(0, 128) * (-1));
            bool  retbool     = sourceSByte.Equals(desSByte);
            if (retbool)
            {
                TestLibrary.TestFramework.LogError("003", "the ExpectResult is not the ActualResult");
                retVal = false;
            }
        }
        catch (Exception e)
        {
            TestLibrary.TestFramework.LogError("004", "Unexpect exception:" + e);
            retVal = false;
        }
        return(retVal);
    }
예제 #19
0
    public bool PosTest3()
    {
        bool retVal = true;

        TestLibrary.TestFramework.BeginScenario("PosTest3: The sbyte maxValue equals SByte minValue");
        try
        {
            sbyte desSByte    = SByte.MinValue;
            sbyte sourceSByte = SByte.MaxValue;
            bool  retbool     = sourceSByte.Equals(desSByte);
            if (retbool)
            {
                TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
                retVal = false;
            }
        }
        catch (Exception e)
        {
            TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
            retVal = false;
        }
        return(retVal);
    }
예제 #20
0
    public bool PosTest6()
    {
        bool retVal = true;

        TestLibrary.TestFramework.BeginScenario("PosTest6: The object is not sbyte");
        try
        {
            object objVal      = "helloworld";
            sbyte  sourceSByte = (sbyte)(this.GetInt32(0, 128) + this.GetInt32(0, 129) * (-1));
            bool   retbool     = sourceSByte.Equals(objVal);
            if (retbool)
            {
                TestLibrary.TestFramework.LogError("001", "the ExpectResult is not the ActualResult");
                retVal = false;
            }
        }
        catch (Exception e)
        {
            TestLibrary.TestFramework.LogError("002", "Unexpect exception:" + e);
            retVal = false;
        }
        return(retVal);
    }
예제 #21
0
    public bool PosTest3()
    {
        bool retVal = true;

        TestLibrary.TestFramework.BeginScenario("PosTest3: The object compare to the random sbyte");
        try
        {
            sbyte  sbyteVal    = (sbyte)(this.GetInt32(0, 128) + this.GetInt32(0, 129) * (-1));
            object objVal      = sbyteVal;
            sbyte  sourceSByte = sbyteVal;
            bool   retbool     = sourceSByte.Equals(objVal);
            if (!retbool)
            {
                TestLibrary.TestFramework.LogError("005", "the ExpectResult is not the ActualResult");
                retVal = false;
            }
        }
        catch (Exception e)
        {
            TestLibrary.TestFramework.LogError("006", "Unexpect exception:" + e);
            retVal = false;
        }
        return(retVal);
    }
예제 #22
0
 /// <summary>
 /// Determine whether or not a value has changed over time.
 /// </summary>
 /// <param name="original">The original value</param>
 /// <param name="current">The current value</param>
 /// <returns><see langword="false"/>, if no changes were detected, or true
 /// if changes were detected.</returns>
 public static bool HasChanges(this sbyte original, sbyte current) =>
 !original.Equals(current);
 /// <summary>
 /// performs sbyte.Equals(object obj) on the base sbyte value.
 /// </summary>
 /// <param name="obj"></param>
 /// <returns></returns>
 public override bool Equals(object obj)
 {
     return(value.Equals(obj));
 }
예제 #24
0
 private static bool LdlocaCheckValueRefI1(sbyte expect, ref sbyte a)
 {
     return(expect.Equals(a));
 }
예제 #25
0
        public void Operacions_amb_tipus()
        {
            //Tipus de dades primitius
            //Els tipus de dades primitius tenen una mida fixa definida pel runtime de .NET

            //SBYTE  signed Byte
            //sbyte System.SByte    8 - bit signed integer    -128:127(-2^7:2^7–1)
            sbyte sbyteMin = -128;
            sbyte sbyteMax = 127;

            Debug.WriteLine("Valor màxim=" + sbyte.MaxValue + " i mínim " + sbyte.MinValue + " d'un sbyte");
            if (sbyteMax == sbyte.MaxValue && sbyteMin.Equals(sbyte.MinValue))
            {
                Debug.WriteLine("Comprovació sbyte perfecta!!");
            }


            //SHORT
            //short System.Int16    16 - bit signed integer   -32,768:32,767(-2^15:2^15–1)
            short shortMin = -32768;
            short shortMax = 32767;

            Debug.WriteLine("Valor màxim=" + Int16.MaxValue + " i mínim " + Int16.MinValue + " d'un short");
            if (shortMax == short.MaxValue && shortMin.Equals(short.MinValue))
            {
                Debug.WriteLine("Comprovació short perfecta!!");
            }

            //INT
            //int System.Int32    32 - bit signed integer   -2,147,483,648:2,147,483,647(-2^31:2^31–1)
            int intMin = -2147483648;
            int intMax = 2147483647;

            Debug.WriteLine("Valor màxim=" + Int32.MaxValue + " i mínim " + Int32.MinValue + " d'un int");
            if (intMax == Int32.MaxValue && intMin.Equals(Int32.MinValue))
            {
                Debug.WriteLine("Comprovació int32 (int) perfecta!!");
            }

            //LONG
            //long System.Int64    64 - bit signed integer   -9,223,372,036,854,775,808: 9,223,372,036,854,775,807(-2^63:2^63–1)
            long longMin = -9223372036854775808;
            long longMax = 9223372036854775807;

            Debug.WriteLine("Valor màxim=" + Int64.MaxValue + " i mínim " + Int64.MinValue + " d'un long");
            if (longMax == Int64.MaxValue && longMin.Equals(Int64.MinValue))
            {
                Debug.WriteLine("Comprovació int64 (long) perfecta!!");
            }

            //BYTE
            //byte System.Byte     8 - bit unsigned integer  0:255(0:2^8–1)
            byte byteMin = 0;
            byte byteMax = 255;

            Debug.WriteLine("Valor màxim=" + Byte.MaxValue + " i mínim " + Byte.MinValue + " d'un byte");
            if (byteMax == Byte.MaxValue && byteMin.Equals(Byte.MinValue))
            {
                Debug.WriteLine("Comprovació byte perfecta!!");
            }

            //UNSIGNED SHORT
            //ushort System.UInt16   16 - bit unsigned integer     0:65,535(0:2^16–1)
            ushort ushortMin = 0;
            ushort ushortMax = 65535;

            Debug.WriteLine("Valor màxim=" + UInt16.MaxValue + " i mínim " + UInt16.MinValue + " d'un unsigned short");
            if (ushortMax == UInt16.MaxValue && ushortMin.Equals(UInt16.MinValue))
            {
                Debug.WriteLine("Comprovació UInt16 (Unsigned Short) perfecta!!");
            }

            //UNSIGNED INT
            //uint System.UInt32   32 - bit unsigned integer     0:4,294,967,295(0:2^32–1)
            uint uintMin = 0;
            uint uintMax = 4294967295;

            Debug.WriteLine("Valor màxim=" + UInt32.MaxValue + " i mínim " + UInt32.MinValue + " d'un unsigned int");
            if (uintMax == UInt32.MaxValue && uintMin.Equals(UInt32.MinValue))
            {
                Debug.WriteLine("Comprovació UInt32 (Unsigned int) perfecta!!");
            }

            //UNSIGNED LONG
            //ulong System.UInt64   64 - bit unsigned integer     0:18,446,744,073,709,551,615(0:2^64–1)
            ulong ulongMin = 0;
            ulong ulongMax = 18446744073709551615;

            Debug.WriteLine("Valor màxim=" + UInt64.MaxValue + " i mínim " + UInt64.MinValue + " d'un unsigned long");
            if (ulongMax == UInt64.MaxValue && ulongMin.Equals(UInt64.MinValue))
            {
                Debug.WriteLine("Comprovació UInt64 (Unsigned long) perfecta!!");
            }


            /////////////////////////////////////////////////////////////////////////////////////
            ///
            intMax = intMax + 3;
            Debug.WriteLine($"Un example d'overflow: intMax+3 --> {intMax}");



            ////////////////////
            ///double i float
            ///
            // Si useu double o float, useu representació en coma flotant.
            // Aquesta representació permet treballar amb magnituds molt grans o petites,
            // però duu associada una precisió que pot fer que el valor que s'emmagatzemi
            // no sigui exactament el valor que voliem desar.

            //FLOAT
            //float System.Single   32 - bit
            Debug.WriteLine("Valor màxim=" + Single.MaxValue + " i mínim " + Single.MinValue + " d'un float");

            //DOUBLE
            //double System.Single   64 - bit
            Debug.WriteLine("Valor màxim=" + Double.MaxValue + " i mínim " + Double.MinValue + " d'un double");


            /////Exemple de canvi de número
            ///
            double doublemeu;

            doublemeu = 123456789.12345678901;

            Debug.WriteLine($"Valor 123456789.12345678901 conte el doublemeu {doublemeu}");


            //Si usem decimal, treballem amb coma fixa.
            //El llenguatge ens garanteix preservar fins a 29 digits sense pèrdua d'informació.
            //Aquest tipus de dades és el que farem servir per representar valors monetaris.
            //DECIMAL
            //decimal System.Decimal  128 bits
            Debug.WriteLine("Valor màxim=" + Decimal.MaxValue + " i mínim " + Decimal.MinValue + " d'un Decimal");

            decimal decimalmeu;

            decimalmeu = 12345678901234567890.1234567891M;
            Debug.WriteLine($"Valor que conté el decimalmeu 12345678901234567890.1234567891 ");
            Debug.WriteLine($"i conté {decimalmeu}");

            /////////////////////////
            ///LITERALS
            ///
            bool    b    = true;
            bool    bf   = false;
            int     i    = 10;
            long    lng  = 1000L;
            ulong   ulng = 10000UL;
            float   f    = 10.4f; // f indica float
            double  d    = 10.4;  // per defecte els nombres amb decimals són float.
            decimal dec  = 10.4M; // M de Money
            char    c    = 'A';


            //Constants
            //Podem definir valors constants,
            //que no es poden manipular posteriorment
            //a la seva declaració.
            //Cal inicialitzar la constant en la declaració.
            const int a = 100;


            //CADENES
            //Les cadenes són UNICODE(per tant cada caràcter ocupa 16bits)

            //Concatenació Concatenem cadenes amb l'operador +
            string nom         = "Joan " + "Ignasi";
            string nom_complet = nom + " Rossell";

            //Salt de línia Podem usar els literals "\n" o "\r\n"per representar el salt de línia:
            string dosLinies = "Primera Línia\nSegona Línia";

            //És millor utilitizar la seva representació genèrica Environment.NewLine:
            dosLinies = "Primera Línia" + Environment.NewLine + "Segona Línia";

            //Autoreemplaçament Si prefixem la cadena amb un $,
            //podem incrustar valors de variables dins de la cadena sense haver de fer concatenacions.
            string cadena       = "Món";
            string autoreemplaç = $"Hola {cadena} ! ";



            //////////////////////////////////////////
            ///
            //CONVERSIONS
            //
            //Qualsevol tipus primitiu es pot convertir a cadena usant .toString()

            //Mètodes de cerca, substitució i trimming
            //MÈTODE                        FUNCIÓ
            //.Substring(posició_inicial)   retorna la subcadena que comença a posició_inicial(inclosa) fins al final
            string cadena2 = "Barcelona";
            string cadena3 = cadena2.Substring(6);

            Debug.WriteLine($"La cadena3 conté ona {cadena3}");

            //.Substring(posició_inicial, num_chars)    retorna la subcadena que comença a posició_inicial(inclosa), prenent num_chars consecutius a partir de la posició inicial(la posició inicial compta)
            cadena3 = cadena2.Substring(3, 3);
            Debug.WriteLine($"La cadena3 conté cel {cadena3}");

            //.Trim()     Elimina espais en blanc a l'inici i final de la cadena
            cadena2 = "   cadena amb espais   ";
            cadena3 = cadena2.Trim();
            Debug.WriteLine($"La cadena3 no té espais a l'inici ni al final {cadena3}");

            //.Trim(char[] caracters)     Elimina els caràcters indicats al paràemtre del inici i final de la cadena
            cadena2 = "....cadena...";
            cadena3 = cadena2.Trim('.');
            Debug.WriteLine($"La cadena3 no té els punts a l'inici ni al final {cadena3}");

            //.PadLeft(num_cars)  omple la cadena per l'esquerra amb espais en blanc, fins assolir longitud num_cars
            cadena2 = "cadena";
            cadena3 = cadena2.PadLeft(10);
            Debug.WriteLine($"La cadena3 té espais a l'inici {cadena3}");

            //.PadLeft(num_cars), caracter_de_padding)  omple la cadena per l'esquerra amb caracter_de_padding, fins assolir longitud num_cars
            cadena3 = cadena2.PadRight(10);
            Debug.WriteLine($"La cadena3 té espais al final {cadena3} <-- fins aqui");

            //.Length     longitud de la cadena
            int num = cadena.Length;

            Debug.WriteLine($"La cadena {cadena} té {num} caràcters");

            //cadena[i]   accés directe al ièssim caràcter de la cadena
            char cc = cadena2[4];


            //Conversions de tipus numèric a cadena
            //Al convertir a cadena un número,
            //podem especificar el nombre de posicions senceres i decimals,
            //així com la utilització o no d'un separador de milers.
            double numeroDec = 2321.23;
            string numString = numeroDec.ToString("#####.000"); //2321,230

            numString = numeroDec.ToString("##,###.000");       //2.321,230
                                                                // Utilitzant un indicador de cultura
            CultureInfo us = new CultureInfo("en-US");

            numString = numeroDec.ToString("##,###.000", us); //2,321.230

            ///////////////////////
            //Conversions de tipus data a cadena
            //
            //Declaració de data
            //Les dates es representen amb el tipus DateTime,
            //que permet emmagatzemar la data i la hora(hores, minuts i segons )
            //de forma conjunta.Per declarar i inicialitzar una data ho podem fer de diverses maneres:
            DateTime ara       = DateTime.Now;                           // ARA, incloent dia i hora
            DateTime avui      = DateTime.Today;                         // ARA, incloent dia només
            DateTime dataD     = new DateTime(2018, 12, 31);             // constructor explícit amb data
            DateTime dataIHora = new DateTime(2018, 12, 31, 22, 30, 59); // constructor explícit amb data i hora

            //Conversió a cadena especificant el format

            //Podem usar cadenes de format per especificar quina és la representació que volem assolir.
            string dataS = dataD.ToString("dd/MM/yyyy");            //  31/12/2018

            dataS = dataD.ToString("dd-MMM-yy hh:mm:ss");           // 31-dic.-17 12:00:00

            dataS = dataD.ToString("dddd, dd \\de MMMM \\de yyyy"); //lunes, 31 de diciembre de 2018

            dataS = dataD.ToString("hh:mm:ss");                     //12:00:00
            CultureInfo enAU = new CultureInfo("en-AU");

            CultureInfo fr = new CultureInfo("fr-FR");

            dataS = dataD.ToString("dddd, dd \\de MMMM \\de yyyy", fr); //lundi, 31 de décembre de 2018
        }
예제 #26
0
 public bool Equals(EventPadButton other)
 {
     return(true && Type.Equals(other.Type) && Window.Equals(other.Window) && SendEvent.Equals(other.SendEvent) && Time.Equals(other.Time) && Group.Equals(other.Group) && Button.Equals(other.Button) && Mode.Equals(other.Mode));
 }
예제 #27
0
    public static void TestEqualsObject(object obj, bool expected)
    {
        sbyte i = 78;

        Assert.Equal(expected, i.Equals(obj));
    }
 public bool Equals(EventTouchpadSwipe other)
 {
     return(true && Type.Equals(other.Type) && Window.Equals(other.Window) && SendEvent.Equals(other.SendEvent) && Phase.Equals(other.Phase) && NFingers.Equals(other.NFingers) && Time.Equals(other.Time) && X.Equals(other.X) && Y.Equals(other.Y) && Dx.Equals(other.Dx) && Dy.Equals(other.Dy) && XRoot.Equals(other.XRoot) && YRoot.Equals(other.YRoot) && State.Equals(other.State));
 }
예제 #29
0
 public bool Equals(ItemStack other)
 {
     return(ID.Equals(other.ID) && Damage.Equals(other.Damage) && Count.Equals(other.Count) && Equals(NBTData, other.NBTData));
     //return ID == other.ID && Damage == other.Damage && Count == other.Count && Slot == other.Slot && Equals(NBTData, other.NBTData);
 }
예제 #30
0
    public static void TestEqualsObject(sbyte i2, bool expected)
    {
        sbyte i = 78;

        Assert.Equal(expected, i.Equals(i2));
    }