Udostępnij za pośrednictwem


IVsExpansionSession.SetFieldDefault(String, String) Method

Definition

Sets the default value for the specified field.

public:
 int SetFieldDefault(System::String ^ bstrFieldName, System::String ^ bstrNewValue);
public:
 int SetFieldDefault(Platform::String ^ bstrFieldName, Platform::String ^ bstrNewValue);
int SetFieldDefault(std::wstring const & bstrFieldName, std::wstring const & bstrNewValue);
public int SetFieldDefault (string bstrFieldName, string bstrNewValue);
abstract member SetFieldDefault : string * string -> int
Public Function SetFieldDefault (bstrFieldName As String, bstrNewValue As String) As Integer

Parameters

bstrFieldName
String

[in] A string containing the name of the field.

bstrNewValue
String

[in] A string containing the default value to use.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From textmgr2.idl:

HRESULT IVsExpansionSession::SetFieldDefault(  
   [in] BSTR bstrFieldName,  
   [in] BSTR bstrNewValue  
);  

Typically, a code snippet specifies default values for all fields. This method is used to override the default value for a specified field.

Applies to