NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

ISymbolWriter.OpenScope

Opens a new lexical scope in the current method.

[Visual Basic]
Function OpenScope( _
   ByVal startOffset As Integer _
) As Integer
[C#]
int OpenScope(
   int startOffset
);
[C++]
int OpenScope(
   int startOffset
) = 0;
[JScript]
function OpenScope(
   startOffset : int
) : int;

Parameters

startOffset
The offset in bytes from the beginning of the method of the first instruction in the lexical scope.

Return Value

An opaque scope identifier that can be used with SetScopeRange to define a scope's start and end offsets at a later time. In this case, the offsets passed to OpenScope and CloseScope are ignored. A scope identifier is valid only in the current method.

Remarks

The scope becomes the new current scope and is effectively pushed onto a stack of scopes. Scopes must form a hierarchy. Siblings are not allowed to overlap.

Scope identifiers are only valid in the current method.

See Also

ISymbolWriter Interface | ISymbolWriter Members | System.Diagnostics.SymbolStore Namespace