PostSharp SDK 6.10 / / Class Reference / Post­Sharp.​Sdk.​Code­Model Namespace / Write­Reflection­Name­Extensions Class / Write­Reflection­Name­Extensions Methods / Write­Reflection­Name­Extensions.​Get­Reflection­Name Method / Write­Reflection­Name­Extensions.​Get­Reflection­Name Method (IWrite­Reflection­Name, Reflection­Name­Options)

WriteReflectionNameExtensions.GetReflectionName Method (IWriteReflectionName, ReflectionNameOptions)

Gets the name of a given declaration and returns a string that is compatible with the result of the ToString method of system reflection objects.

Namespace:  PostSharp.Sdk.CodeModel
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: (
public static string GetReflectionName(
	this IWriteReflectionName declaration,
	ReflectionNameOptions options


Type: PostSharp.Sdk.CodeModel.IWriteReflectionName
A declaration.
Type: PostSharp.Sdk.CodeModel.ReflectionNameOptions

Return Value

Type: String
A string identical to the result of the ToString method of the reflection object corresponding to declaration.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IWriteReflectionName. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also