设置特定字段的默认值。
命名空间: Microsoft.VisualStudio.TextManager.Interop
程序集: Microsoft.VisualStudio.TextManager.Interop.8.0(在 Microsoft.VisualStudio.TextManager.Interop.8.0.dll 中)
语法
声明
Function SetFieldDefault ( _
bstrFieldName As String, _
bstrNewValue As String _
) As Integer
int SetFieldDefault(
string bstrFieldName,
string bstrNewValue
)
int SetFieldDefault(
[InAttribute] String^ bstrFieldName,
[InAttribute] String^ bstrNewValue
)
abstract SetFieldDefault :
bstrFieldName:string *
bstrNewValue:string -> int
function SetFieldDefault(
bstrFieldName : String,
bstrNewValue : String
) : int
参数
bstrFieldName
类型:String[in] 包含字段的名称的字符串。
bstrNewValue
类型:String[in] 包含默认的字符串使用。
返回值
类型:Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。
备注
COM 签名
从 textmgr2.idl:
HRESULT IVsExpansionSession::SetFieldDefault(
[in] BSTR bstrFieldName,
[in] BSTR bstrNewValue
);
通常,代码段的所有字段指定默认值。 此方法用于重写一个指定字段的默认值。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。