SemanticValue.Value 속성

정의

현재 SemanticValue에 포함된 정보를 반환하는 읽기 전용 속성

public:
 property System::Object ^ Value { System::Object ^ get(); };
public object Value { get; }
member this.Value : obj
Public ReadOnly Property Value As Object

속성 값

Object

Object 인스턴스를 반환합니다. 이 인스턴스에는 현재SemanticValue 인스턴스가 저장된 정보가 포함되어 있습니다.

예제

다음 예제에서는 재귀적으로 트래버스 되 고 다음 정보 (신뢰도 포함)으로 표시를 TreeNodeCollection, 되거나 노드로 트리 구조의 의미 체계를 구성 하는 데 구를 인식 합니다.

internal static void CreateSemanticsTreeNodes(  
          TreeNodeCollection nodes,  
          SemanticValue semantics,  
          String name)   
{  
  string semanticsText =   
      String.Format("  {0} ( Confidence {1})", name,semantics.Confidence);  

  // Format integers as hexadecimal.  
  if (semantics.Value == null )  
  {  
    semanticsText = semanticsText + " = null";  
  }  
  else if (semantics.Value.GetType() == typeof(int))   
  {  
    semanticsText = String.Format("{0} = {1:X} ", semanticsText, semantics.Value);  
  }  
  else   
  {  
    semanticsText = semanticsText + " = " + semantics.Value.ToString();  
  }  

  TreeNode semanticsNode = new TreeNode(semanticsText);  
  foreach (KeyValuePair<String, SemanticValue> child in semantics)   
  {  
    CreateSemanticsTreeNodes(semanticsNode.Nodes, child.Value, child.Key);  
  }  
  nodes.Add(semanticsNode);  
}  

설명

구문 의미 분석의 사용 되지 않도록 하는 인식 결과 항상을 ValuenullCount 0의 속성입니다.

적용 대상