int BothTypes(ClassString a, out StructString b) { a.name = "Betty"; b.name = "Veronica"; return(5); }
public void StructStringList() { var list = new List <StructString>(); for (int i = 0; i < size; i++) { var tmp = new StructString("0"); list.Add(tmp); } }
public void StructStringArray() { var array = new StructString[size]; for (int i = 0; i < size; i++) { var tmp = new StructString("0"); array[i] = tmp; } }
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); }
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); } }
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]); }