Hello!
I have a very simple example below. The problem is that I get the following
compile error
Error 1 Cannot implicitly convert type 'System.Reflect ion.MemberInfo[]' to
'MemberInfo[]' F:\C#\ConsoleAp plication12\Con soleApplication 12\MemberInfo.c s
27 46 ConsoleApplicat ion12
I can't understand why I get this compile error because according to the
documentation it should work.
Is this a bug perhaps ??
class MemberInfo
{
int MYVALUE;
public void THIS_IS_A_METHO D()
{}
public int myValue
{
set { MYVALUE = value; }
}
static void Main(string[] args)
{
string testclass = "MemberInfo ";
Console.WriteLi ne("\nFöljande är medlemsinfo för klassen:{0}",
testclass);
Type MyType = Type.GetType(te stclass);
MemberInfo[] Mymemberinfoarr ay = MyType.GetMembe rs();
}
}
//Tony
I have a very simple example below. The problem is that I get the following
compile error
Error 1 Cannot implicitly convert type 'System.Reflect ion.MemberInfo[]' to
'MemberInfo[]' F:\C#\ConsoleAp plication12\Con soleApplication 12\MemberInfo.c s
27 46 ConsoleApplicat ion12
I can't understand why I get this compile error because according to the
documentation it should work.
Is this a bug perhaps ??
class MemberInfo
{
int MYVALUE;
public void THIS_IS_A_METHO D()
{}
public int myValue
{
set { MYVALUE = value; }
}
static void Main(string[] args)
{
string testclass = "MemberInfo ";
Console.WriteLi ne("\nFöljande är medlemsinfo för klassen:{0}",
testclass);
Type MyType = Type.GetType(te stclass);
MemberInfo[] Mymemberinfoarr ay = MyType.GetMembe rs();
}
}
//Tony
Comment