Open sandboxFocus

Method GetMessageLocation

GetMessageLocation(object)

Gets the file and line where a declaration is declared.

Declaration
MessageLocation GetMessageLocation(object codeElement)
Parameters
Type Name Description
object codeElement

A MemberInfo, Type, ParameterInfo or LocationInfo.

Returns
Type Description
MessageLocation

A MessageLocation describing where codeElement is declared, or Unknown if the location cannot be determined.