vendredi 13 février 2015

How to get Documentation of method or class using Reflection? [duplicate]


This question already has an answer here:





var className = typeof(Console);
var methodInfo = className.GetMethod("WriteLine",new [] { typeof(string) });


I got a methodInfo object for Writeline method , now if we see a defination of that method , it look like this .



//
// Summary:
// Writes the specified string value, followed by the current line terminator,
// to the standard output stream.
//
// Parameters:
// value:
// The value to write.
//
// Exceptions:
// System.IO.IOException:
// An I/O error occurred.
public static void WriteLine(string value);


what i want is getting the comments for a perticular method. , is there any way i can achieve this using Reflection ? or any other possible way ?






Aucun commentaire:

Enregistrer un commentaire