PublishedEvent.FieldList.TryGetValue 方法

Gets the value associated with the specified key.

命名空间:  Microsoft.SqlServer.XEvent.Linq
程序集:  Microsoft.SqlServer.XEvent.Linq(在 Microsoft.SqlServer.XEvent.Linq.dll 中)

语法

声明
Public Function TryGetValue ( _
    fieldName As String, _
    <OutAttribute> ByRef value As PublishedEventField _
) As Boolean
用法
Dim instance As PublishedEvent.FieldList 
Dim fieldName As String 
Dim value As PublishedEventField 
Dim returnValue As Boolean 

returnValue = instance.TryGetValue(fieldName, _
    value)
public bool TryGetValue(
    string fieldName,
    out PublishedEventField value
)
public:
bool TryGetValue(
    String^ fieldName, 
    [OutAttribute] PublishedEventField^% value
)
member TryGetValue : 
        fieldName:string * 
        value:PublishedEventField byref -> bool
public function TryGetValue(
    fieldName : String, 
    value : PublishedEventField
) : boolean

参数

  • fieldName
    类型:System.String
    The name of the field to retrieve.
  • value
    类型:Microsoft.SqlServer.XEvent.Linq.PublishedEventField%
    When this method returns, contains the field associated with the specified key, if the key is found. Otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.

返回值

类型:System.Boolean
true if the event contains a field with the specified column; otherwise, false.

请参阅

参考

PublishedEvent.FieldList 类

Microsoft.SqlServer.XEvent.Linq 命名空间