L
Lambuz
Hi all,
when I use MethosInfo.Invoke method I obtain a
TargetInvocationException where inner exception is
+{"classBase.OpenConn cannot be invoked directly" } System.Exception.
I'm using the following class
public abstract class classBase{
public static int OpenConn(){
....
}
}
public abstract class classDerived: classBase{
}
In my code I'm obtaining the info about OpenConn method starting from
the type of classDerived by using this code:
methodInfo =
classDerivedType.GetMethod("OpenArchive",BindingFlags.Static|BindingFlags.Public|BindingFlags.FlattenHierarchy);
If I dont'use any bindign flags GetMethod return null.
Anyone can help me ?
when I use MethosInfo.Invoke method I obtain a
TargetInvocationException where inner exception is
+{"classBase.OpenConn cannot be invoked directly" } System.Exception.
I'm using the following class
public abstract class classBase{
public static int OpenConn(){
....
}
}
public abstract class classDerived: classBase{
}
In my code I'm obtaining the info about OpenConn method starting from
the type of classDerived by using this code:
methodInfo =
classDerivedType.GetMethod("OpenArchive",BindingFlags.Static|BindingFlags.Public|BindingFlags.FlattenHierarchy);
If I dont'use any bindign flags GetMethod return null.
Anyone can help me ?