public Class Someclass { public Struct Clues { public Clues(int value) { Array = new byte[2]; num = value; } public byte[] Array; public int num; }; }
Someclass.Clues S = new Someclass.Clues(0);
SomeProcedure(Someclass.Clues qq) { qq.Array[0]=0; //Error Pops Up Here qq.num=25; }
public class Someclass { public struct Clues { public Clues(int value) { Array = new byte[2]; num = value; } public byte[] Array; public int num; }; public void xyz(Someclass.Clues qq) { qq.Array[0] = 0; qq.num = 25; } } class Program { static void Main(string[] args) { Someclass.Clues S = new Someclass.Clues(0); Someclass x = new Someclass(); x.xyz(S); } }
Someclass.Clues qq = new Someclass.Clues(); SomeProcedure(qq); SomeProcedure(Someclass.Clues qq) { qq.Array[0]=0; //Error Pops Up Here qq.num=25; }
using System; using System.Collections.Generic; public class Someclass { public struct Clues { public Clues(int value) { Array = new byte[2]; num = value; } public byte[] Array; public int num; }; } public class MyClass { public static void Main() { Someclass.Clues S = new Someclass.Clues(0); doSomething(S); } private static void doSomething(Someclass.Clues qq) { qq.Array[0] = 0; qq.num = 25; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)