Problems with InvokeMember()
- From: jan.hejmann@xxxxxxxxx
- Date: 23 Aug 2005 06:25:42 -0700
Hello,
I have a problem and the search don´t match a result:
I am trying to change the value of public attribute of type double,
which name i am getting at runtime. I was trying to use
Type.InvokeMember()... and now my question:
How is it possible to change an attribute of an object at the runtime
via 'Invoke.Member'?
The example from MSDN works fine for strings ,but it's not working for
primitives like 'double'
Type mtype = m.GetType();
mtype.InvokeMember("AttributName", BindingFlags.SetField, null, m,
2.5);
//m.AttributName is double
Thanks al lot
Jan
PS: I hope I have made my first post correctly
.
- Follow-Ups:
- Re: Problems with InvokeMember()
- From: Bruce Wood
- Re: Problems with InvokeMember()
- Prev by Date: Re: .net 2.0: ASP.NET 2.0 upload path, rooted path??
- Next by Date: [ANNOUNCE] TargetProcess: Suite 1.3.5 - Agile Management Software
- Previous by thread: .net 2.0: ASP.NET 2.0 upload path, rooted path??
- Next by thread: Re: Problems with InvokeMember()
- Index(es):
Relevant Pages
|