共用方式為


RecognizerInfo.AdditionalInfo 屬性

定義

取得 SpeechRecognizerSpeechRecognitionEngine 執行個體的其他資訊。

public:
 property System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ AdditionalInfo { System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ get(); };
public System.Collections.Generic.IDictionary<string,string> AdditionalInfo { get; }
member this.AdditionalInfo : System.Collections.Generic.IDictionary<string, string>
Public ReadOnly Property AdditionalInfo As IDictionary(Of String, String)

屬性值

IDictionary<String,String>

傳回 IDictionary<TKey,TValue> 的執行個體,包含 SpeechRecognizerSpeechRecognitionEngine 物件的組態資訊。

範例

下列範例會執行按鈕按一下,以顯示物件中的所有資訊 RecognizerInfo MessageBox

所傳回之實例中所包含的索引鍵/值組 IDictionary<TKey,TValue> AdditionalInfo 會串連成文字資料表。

private void recognizerInfoButton_Click(object sender, EventArgs e)   
{  
  RecognizerInfo info = _recognizer.RecognizerInfo;  
  string AudioFormats = "";  
  foreach (SpeechAudioFormatInfo fmt in info.SupportedAudioFormats)   
  {  
    AudioFormats += String.Format("       {0}\n", fmt.EncodingFormat.ToString());  
  }  
  string AdditionalInfo = "";  
  foreach (string key in info.AdditionalInfo.Keys)   
  {  
    AdditionalInfo += String.Format("      {0}: {1}\n", key, info.AdditionalInfo[key]);  
  }  
  MessageBox.Show(String.Format(  
                     "Name:                 {0 } \n" +  
                     "Description:          {1} \n" +  
                     "SupportedAudioFormats:\n" +  
                     " {2} " +  
                     "Culture:              {3} \n" +  
                     "AdditionalInfo:       \n" +  
                     " {4}\n",  
                     info.Name.ToString(),  
                     info.Description.ToString(),  
                     AudioFormats,  
                     info.Culture.ToString(),  
                     AdditionalInfo));  
}  

適用於

另請參閱