T
Tony Johansson
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.Reflection.MemberInfo[]' to
'MemberInfo[]' F:\C#\ConsoleApplication12\ConsoleApplication12\MemberInfo.cs
27 46 ConsoleApplication12
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_METHOD()
{}
public int myValue
{
set { MYVALUE = value; }
}
static void Main(string[] args)
{
string testclass = "MemberInfo";
Console.WriteLine("\nFöljande är medlemsinfo för klassen:{0}",
testclass);
Type MyType = Type.GetType(testclass);
MemberInfo[] Mymemberinfoarray = MyType.GetMembers();
}
}
//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.Reflection.MemberInfo[]' to
'MemberInfo[]' F:\C#\ConsoleApplication12\ConsoleApplication12\MemberInfo.cs
27 46 ConsoleApplication12
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_METHOD()
{}
public int myValue
{
set { MYVALUE = value; }
}
static void Main(string[] args)
{
string testclass = "MemberInfo";
Console.WriteLine("\nFöljande är medlemsinfo för klassen:{0}",
testclass);
Type MyType = Type.GetType(testclass);
MemberInfo[] Mymemberinfoarray = MyType.GetMembers();
}
}
//Tony