.Net reflection to get a description of the class / property, etc.?

I know this is unlikely, but I was wondering if there is a way to get comments (i.e. a bit after the `` '') of a class or property. I managed to get a list of class properties using the PropertyInfo class, but I can't find a way to get comments / description.I need this for the guide that I write for the administrators of my site - it would be great if it can automatically update when new properties are added, so there is no need to worry about updating it in the future too much. Does anyone know how do it? s thank you in advance.

Hi,

Richard

+3
source share
5

:


[Description('This is my property description')]
public String MyStringProp { get; set; }

FieldInfo.GetCustomAttributes
, .
+3

. /doc switch, XML , .

+1

, , .

, Visual Studio ( , ), XML , , .

0

.
, xml-comments ( , VB '' ') ( # → build → / xml), . .

xml VBasic.

0

Source: https://habr.com/ru/post/1741116/


All Articles