共用方式為


IVsExpansionFunction.FieldChanged(String, Int32) Method

Definition

Called when another field in the inserted code snippet is changed.

public:
 int FieldChanged(System::String ^ bstrField, [Runtime::InteropServices::Out] int % fRequeryFunction);
int FieldChanged(std::wstring const & bstrField, [Runtime::InteropServices::Out] int & fRequeryFunction);
public int FieldChanged (string bstrField, out int fRequeryFunction);
abstract member FieldChanged : string * int -> int
Public Function FieldChanged (bstrField As String, ByRef fRequeryFunction As Integer) As Integer

Parameters

bstrField
String

[in] Name of the field that changed.

fRequeryFunction
Int32

[out] Returns non-zero (true) if this expansion function's value has changed and must be re-obtained; otherwise, returns zero (false).

Returns

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

Remarks

COM Signature

From textmgr2.idl:

bool IVsExpansionFunction::FieldChanged(  
   [in] BSTR bstrField,  
   [out] bool *fRequeryFunction  
);  

This method is called when another field in the code snippet is changed, typically because the user edited the field. If this method sets the fRequeryFunction parameter to non-zero (true), the GetCurrentValue method should be called to fetch the updated value for this expansion function.

Applies to