Type.GetType() bring null
I use this function, to get the type of some enums, from string:
when I use it for system enum- like Type.GetType("System.ConsoleColor")- I
got the type,
but when I use it for enum whitch I declared- like
Type.GetType("SignalModule.Implementation.SubscriberType")
I got null
when i tried in the immediate-window to key this orders: *
SignalModule.Implementation.SubscriberType I got the truth type:
SignalModule.Implementation.SubscriberType EventSignalChange:
EventSignalChange Polling: Polling
*Type.GetType(SignalModule.Implementation.SubscriberType) I got the error:
'SignalModule.Implementation.SubscriberType' is a 'type', which is not
valid in the given context
*Type.GetType("SignalModule.Implementation.SubscriberType") I got: null
what should be the problem?
No comments:
Post a Comment