This article is a mirror article of machine translation, please click here to jump to the original article.

View: 23414|Reply: 1

[Source] C# reflection determines whether the type of a property is a string or a collection

[Copy link]
Posted on 2019-10-25 13:36:59 | | |
First, the structure is as follows:



The reflection loop gets the attribute type and value, and the code is as follows:

Get a value that indicates whether the type is an array or not.

Return
// The example displays the following output:
//       String:         IsArray = False
//       Int32[]:        IsArray = True
//       ArrayList:      IsArray = False
//       Array:          IsArray = False
//       List`1:         IsArray = False
//       IEnumerable`1:  IsArray = False






Previous:The best image and video watermark remover software - EasePaint Watermark Remover
Next:2020 Jiangsu Provincial Examination System Class Video Tutorial
Posted on 2019-10-25 14:51:51 |
Mark it! Check it out!
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com