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
:
[Description('This is my property description')] public String MyStringProp { get; set; }
FieldInfo.GetCustomAttributes
, XML, ?
, , - MSDN.
:http://msmvps.com/blogs/jon_skeet/archive/2010/04/10/documentation-with-sandcastle-a-notebook.aspx
. /doc switch, XML , .
, , .
, Visual Studio ( , ), XML , , .
., xml-comments ( , VB '' ') ( # → build → / xml), . .
xml VBasic.
Source: https://habr.com/ru/post/1741116/More articles:How to export a database from SQL Server 2008 to SQL Server 2005 - sql-serverURL or email address as a link in UILabel - objective-cProblems declaring and recognizing global functions - c ++Определить, будет ли поле FieldInfo генерируемым компилятором - reflectionC #: How to print Unicode string for console? - c #Can a Java class implement a C ++ interface - javaAs default table view - listAndroid paint / canvas issue; drawing smooth curves - androidWhy my test does not work - javaUsing the "WinForms.NET" SplitContainer control, how can I hide the panel dynamically? - .netAll Articles