I am trying to set a static field using Type.InvokeMember, but get an error:
"Only the field value can be specified to set a field value.
Parameter name: invokeAttr"
I get the above error when using binding flag =  
BindingFlags.Public|BindingFlags.Static|BindingFlags.SetField
I don't see any other sensible binding flag value that I can set.

The class I am using is as simple as can be, i.e. a class with just a public static 
member.
Anyone that has a working example of using InvokeMember to set a static field?

Regards,
Kjell Tangen

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
NEW! ASP.NET courses you may be interested in:

2 Days of ASP.NET, 29 Sept 2003, in Redmond
http://www.develop.com/courses/2daspdotnet

Guerrilla ASP.NET, 13 Oct 2003, in Boston
http://www.develop.com/courses/gaspdotnet

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to