[Mono-bugs] [Bug 445903] GetField() API fails on Mono 2.0
    bugzilla_noreply at novell.com 
    bugzilla_noreply at novell.com
       
    Wed Nov 19 03:47:59 EST 2008
    
    
  
https://bugzilla.novell.com/show_bug.cgi?id=445903
User kuanil at novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=445903#c5
--- Comment #5 from Anil Kumar <kuanil at novell.com>  2008-11-19 01:47:58 MST ---
Update from my side : 
" config.GetType().GetField("maxRequestLength",
                                BindingFlags.Instance|BindingFlags.Public ); " 
is still failing giving null on Mono 2.0 .
But We have another call : " config.GetType().GetProperty("maxRequestLength",
                              BindingFlags.Instance|BindingFlags.NonPublic ); "
This was also giving null with Mono2.0 , but when i added one more flag s.t.
it becomes :  " config.GetType().GetProperty("maxRequestLength",
           BindingFlags.Instance|BindingFlags.NonPublic|BindingFlags.Public );
"
Then it started working. 
But my question is : Can i use this as workaround ? What are the potential
problems if i add one more BindingFlags to get it work ? Is there a way where
my old code with "GetField()" and "GetProperty()" will work ?  We are planning
to port our application on Mono 2.0 so this requires a quick resolution.
-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
    
    
More information about the mono-bugs
mailing list