ISymbolWriter Interface


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Represents a symbol writer for managed code.

Namespace:   System.Diagnostics.SymbolStore
Assembly:  mscorlib (in mscorlib.dll)

public interface ISymbolWriter


Closes ISymbolWriter and commits the symbols to the symbol store.


Closes the current method.


Closes the most recent namespace.


Closes the current lexical scope.

System_CAPS_pubmethodDefineDocument(String, Guid, Guid, Guid)

Defines a source document.

System_CAPS_pubmethodDefineField(SymbolToken, String, FieldAttributes, Byte[], SymAddressKind, Int32, Int32, Int32)

Defines a field in a type or a global field.

System_CAPS_pubmethodDefineGlobalVariable(String, FieldAttributes, Byte[], SymAddressKind, Int32, Int32, Int32)

Defines a single global variable.

System_CAPS_pubmethodDefineLocalVariable(String, FieldAttributes, Byte[], SymAddressKind, Int32, Int32, Int32, Int32, Int32)

Defines a single variable in the current lexical scope.

System_CAPS_pubmethodDefineParameter(String, ParameterAttributes, Int32, SymAddressKind, Int32, Int32, Int32)

Defines a single parameter in the current method. The type of each parameter is taken from its position within the signature of the method.

System_CAPS_pubmethodDefineSequencePoints(ISymbolDocumentWriter, Int32[], Int32[], Int32[], Int32[], Int32[])

Defines a group of sequence points within the current method.

System_CAPS_pubmethodInitialize(IntPtr, String, Boolean)

Sets the metadata emitter interface to associate with a writer.


Opens a method to place symbol information into.


Opens a new namespace.


Opens a new lexical scope in the current method.

System_CAPS_pubmethodSetMethodSourceRange(ISymbolDocumentWriter, Int32, Int32, ISymbolDocumentWriter, Int32, Int32)

Specifies the true start and end of a method within a source file. Use SetMethodSourceRange to specify the extent of a method, independent of the sequence points that exist within the method.

System_CAPS_pubmethodSetScopeRange(Int32, Int32, Int32)

Defines the offset range for the specified lexical scope.

System_CAPS_pubmethodSetSymAttribute(SymbolToken, String, Byte[])

Defines an attribute when given the attribute name and the attribute value.


Sets the underlying ISymUnmanagedWriter (the corresponding unmanaged interface) that a managed ISymbolWriter uses to emit symbols.


Identifies the user-defined method as the entry point for the current module.


Specifies that the given, fully qualified namespace name is used within the open lexical scope.

The ISymbolWriter interface provides methods that define documents, sequence points, lexical scopes, and variables.


This interface is the managed counterpart of the ISymUnmanagedWriter interface, which is one of the unmanaged symbol store interfaces that provides an alternative way to read and write debug symbol information.

.NET Framework
Available since 1.1
Return to top