'宣言 Public Function CheckText( _ ByVal text As String _ ) As ErrorCollection
public ErrorCollection CheckText( string text )
Imports Infragistics.Win.UltraWinSpellChecker Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim text As String = "Thiis is som mispelled text." 'Get a collection of the errors in the text Dim errors As ErrorCollection = Me.spellChecker.CheckText(text) MessageBox.Show("The text: """ + text + """ contains " + errors.Count.ToString() + " errors.") End Sub
using System.Windows.Forms; using Infragistics.Win.UltraWinSpellChecker; private void button1_Click( object sender, EventArgs e ) { string text = "Thiis is som mispelled text."; //Get a collection of the errors in the text ErrorCollection errors = this.spellChecker.CheckText( text ); MessageBox.Show( "The text: \"" + text + "\" contains " + errors.Count + " errors." ); }