Dim a As Assembly = Assembly.GetAssembly (GetType(System.Net.Configuration.SettingsSection))
Dim t As Type = a.GetType("System.Net.Configuration.SettingsSectionInternal")
Dim o As Object = t.InvokeMember("Section", BindingFlags.Static Or BindingFlags.GetProperty Or BindingFlags.NonPublic,
Nothing, Nothing, New Object() {})
Dim f As FieldInfo = t.GetField("useUnsafeHeaderParsing",
BindingFlags.NonPublic Or BindingFlags.Instance)
Dim r As Boolean = DirectCast(f.GetValue(o), Boolean)
f.SetValue(o, b)
|