C# out struct parameter -


i have code in c# have problem whit code:

struct mystruct {   public string sone;   public string stwo; }  public static int changestruct(out mystruct[] arrmystruct) {   arrmystruct= new mystruct[256];   arrsnchildrenstruct[0].sone= "";   arrsnchildrenstruct[0].stwo= "";    return 0; } 

but when build, have error: inconsistent accessibility: parameter type 'out ........ less accessible method .....

what's wrong? thanks

make public struct mystruct instead of internal struct. or make changestruct() private if use locally.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -