예제 #1
0
    int BothTypes(ClassString a, out StructString b)
    {
        a.name = "Betty";
        b.name = "Veronica";


        return(5);
    }
예제 #2
0
        public void StructStringList()
        {
            var list = new List <StructString>();

            for (int i = 0; i < size; i++)
            {
                var tmp = new StructString("0");
                list.Add(tmp);
            }
        }
예제 #3
0
        public void StructStringArray()
        {
            var array = new StructString[size];

            for (int i = 0; i < size; i++)
            {
                var tmp = new StructString("0");
                array[i] = tmp;
            }
        }
예제 #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            StructString S1 = new StructString();
            StructString S2 = new StructString();

            S1.txt = textBox1.Text;
            S2.txt = textBox2.Text;

            Console.WriteLine(S1.txt);
            Console.WriteLine(S2.txt);
            Console.WriteLine(String.Concat(S1.txt, S2.txt));

            textBox3.Text = String.Concat(S1.txt, S2.txt);
        }
예제 #5
0
        public void StructStringArrayPool()
        {
            var arrayPool = ArrayPool <StructString> .Shared;
            var array     = arrayPool.Rent(size);

            try
            {
                for (int i = 0; i < size; i++)
                {
                    var tmp = new StructString("0");
                    array[i] = tmp;
                }
            }
            finally
            {
                arrayPool.Return(array);
            }
        }
예제 #6
0
 public bool Equals(StructString obj)
 {
     byte[] key = _key;
     return key.Length == obj._key.Length && Enumerable.Range(0, key.Length).All(i => key[i] == obj._key[i]);
 }