I'm trying to get the field info of an array value from within a struct. So far I have the following, but I dont see how to get the infomration I want.
[StructLayout(LayoutKind.Sequential)]
public struct Test
{
public byte Byte1;
[MarshalAs(UnmanagedType.ByValArray, SizeConst=3)]
public Test2[] Test1...
I wrote a method that extracts fields from an object like this:
private static string GetHTMLStatic(ref Object objectX, ref List<string> ExludeFields)
{
Type objectType = objectX.GetType();
FieldInfo[] fieldInfo = objectType.GetFields();
foreach (FieldInfo field in fieldInfo)
{
if(!ExludeFields.Contains(field.Na...
Hi,
I have a question:
Is there an elegant way of getting Attributes on a referenced field.
Ie.:
public class C1: Base
{
[MyAttribute]
public string Field1;
}
public class Base
{
private void Do(ref string field)
{
if (field has attributes)
DoSomething();
}
}
How can I get attributes of a f...
I want to get all the fields of a class without getting the underlying implementations of the class event.
type.GetFields(BindingFlags...) returns the nuderlying delegate for event fields. Does anyone knows how to filter them out ?
...