propertyinfo
query properties of an object with linq
I want to scan a type for it\'s properties and the annotated attributes and return an object with the following structure[详细]
2023-02-15 00:21 分类:问答Getting value of an AutoProperty that has no getter using PropertyInfo.GetValue
I am trying to get the value of a string property in a unit test. The problem is that the property has no getter. The property is also declared as an AutoProperty and has no back开发者_如何转开发ing f[详细]
2023-02-10 03:22 分类:问答C# convert reflection.propertyinfo to Generic.List<>
How do I go about converting a refle开发者_StackOverflowction.propertyinfo[] to a generic.list<>?One of the List<T> constructors accepts an IEnumerable<T> as its argument (i.e., your Pr[详细]
2023-02-08 17:46 分类:问答Using reflection read properties of an object containing array of another object
How can I read the properties of an object that contains an element of array type using reflection in c#. If I have a method called GetMyProperties and I determine that the object is a custom type the[详细]
2023-02-08 08:55 分类:问答PropertyInfo : is the property an indexer?
I have the following code : PropertyInfo[] originalProperties = myType.GetProperties(); I want to exclude from originalProperties all the indexers (myVar[\"key\"] appears as property named \"Item\"[详细]
2023-02-06 05:38 分类:问答Get string name of property using reflection
There is a whole wealth of reflection examples out there that allow you to get either: All properties in a class[详细]
2023-01-15 08:46 分类:问答Reflection failed for properties on anonymous types in Silverlight
I\'m using Silverlight 4 with VS 2010 and trying to do reflection on anonymous type and I got some \"Attempt by method \'...\' to access method \'...\' failed.\". I tried various workarounds for this[详细]
2023-01-14 21:35 分类:问答Is there any way to get the PropertyInfo from the getter of that property?
Is there any way I can get the PropertyInfo for a property from its getter? Like this: public object Foo[详细]
2023-01-11 19:17 分类:问答Members of object not being returned by PropertyInfo c#
I\'m trying to use PropertyInfo interate through a class and create a datatable from it.However it returns no values.I\'m a little stumped;[详细]
2023-01-05 23:11 分类:问答Ignore collection properties in PropertyInfo
I have a function with this code: foreach (PropertyInfo propertyInfo in typeof(T).GetProperties()){ //SOME CODE[详细]
2022-12-30 02:25 分类:问答