开发者

properties of a class to be compared with columns in excel sheet

开发者 https://www.devze.com 2023-02-10 03:52 出处:网络
How to compare properties of a c开发者_如何转开发lass with columns in excel sheet ?i dont know how to get the columns of an excel sheet, but i am sure, thats very simple (i never did this till now).

How to compare properties of a c开发者_如何转开发lass with columns in excel sheet ?


i dont know how to get the columns of an excel sheet, but i am sure, thats very simple (i never did this till now).

To retrieve the properties of a class, you can use the GetProperties method of the type:

foreach (var propertyInfo in this.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public))
{
    Console.WriteLine(propertyInfo.Name);
}

cherio, Chris

0

精彩评论

暂无评论...
验证码 换一张
取 消