Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var prop = Backend.GetType().GetProperty(fieldName);
- var prop = Backend.GetType().GetProperty(fieldName, BindingFlags.IgnoreCase);
- using System;
- using System.Reflection;
- public class Test
- {
- private int foo;
- public int Foo { get { return foo; } }
- static void Main()
- {
- var prop = typeof(Test).GetProperty("foo",
- BindingFlags.Public
- | BindingFlags.Instance
- | BindingFlags.IgnoreCase);
- Console.WriteLine(prop);
- }
- }
- var prop = Backend.GetType().GetProperty(fieldName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.IgnoreCase);
Add Comment
Please, Sign In to add comment