Microsoft KB Archive/814723

= Incorrect help topics for CodeModel.AddFunction and CodeModel.AddVariable in Visual Studio .NET =

Article ID: 814723

Article Last Modified on 5/11/2007

-

APPLIES TO


 * MSDN 2003 Universal Edition
 * Microsoft .NET Framework 1.1
 * Microsoft .NET Framework 1.0
 * Microsoft Visual Basic .NET 2003 Standard Edition
 * Microsoft Visual Basic .NET 2002 Standard Edition
 * Microsoft Visual C# .NET 2003 Standard Edition
 * Microsoft Visual C# .NET 2002 Standard Edition

-



SUMMARY
In the Microsoft Visual Studio .NET Documentation, the help topics for the following methods describe these methods incorrectly:
 * CodeModel.AddFunction
 * CodeModel.AddVariable

For more information, visit the following Microsoft Web sites:

AddFunction Method [Variation 1] (General Extensibility)

http://msdn2.microsoft.com/en-us/library/aa293130(VS.71).aspx

AddVariable Method [Variation 2] (General Extensibility)

http://msdn2.microsoft.com/en-us/library/aa293157(VS.71).aspx



MORE INFORMATION
  The CodeModel.AddFunction signature is incorrectly documented as the following:

Visual Basic .NET Public Function AddFunction( _  Name As String, _   Kind As vsCMFunction, _   Type As Variant, _   Position As Variant, _   Optional Access As vsCMAccess = vsCMAccessDefault, _   Optional Location As Variant _ ) As CodeFunction Visual C# .NET CodeFunction AddFunction(  string Name,   vsCMFunction Kind,   object Type,   object Position,   vsCMAccess Access,   object Location );

The signature should read as follows:

Visual Basic .NET Public Function AddFunction( _  Name As String, _   Location As Variant, _   Kind As vsCMFunction, _   Type As Variant, _   Position As Variant, _   Optional Access As vsCMAccess = vsCMAccessDefault _ ) As CodeFunction Visual C# .NET CodeFunction AddFunction(  string Name,   object Location,   vsCMFunction Kind,   object Type,   object Position,   vsCMAccess Access );   The CodeModel.AddVariable signature is incorrectly documented as the following:

Visual Basic .NET Public Function AddVariable( _  Name As String, _   Type As Variant, _   Position As Variant, _   Optional Access As vsCMAccess = vsCMAccessDefault, _   Optional Location As Variant _ ) As CodeVariable Visual C# .NET CodeVariable AddVariable(  string Name,   object Type,   object Position,   vsCMAccess Access,   object Location ); The signature should read as follows:

Visual Basic .NET Public Function AddVariable( _  Name As String, _   Location As Variant, _   Type As Variant, _   Position As Variant, _   Optional Access As vsCMAccess = vsCMAccessDefault _ ) As CodeVariable Visual C# .NET CodeVariable AddVariable(  string Name,   object Location,   object Type,   object Position,   vsCMAccess Access ); 

Note The Location parameter in both the methods is not optional; it is mandatory.

