System.ComponentModel.MaskedTextProvider.Add C# (CSharp) Method

Add() public method

Attempts to add the specified charactert to the last unoccupied positions in the test string (append text to the virtual string). Returns true on success, false otherwise.
public Add ( char input ) : bool
input char
return bool
        public bool Add(char input)
        {
            int dummyVar;
            MaskedTextResultHint dummyVar2;
            return Add(input, out dummyVar, out dummyVar2);
        }

Same methods

MaskedTextProvider::Add ( char input, int &testPosition, MaskedTextResultHint &resultHint ) : bool
MaskedTextProvider::Add ( string input ) : bool
MaskedTextProvider::Add ( string input, int &testPosition, MaskedTextResultHint &resultHint ) : bool

Usage Example

Ejemplo n.º 1
0
		public void Add_string_int_MaskedTextResultHint_Test00001 ()
		{
			MaskedTextProvider mtp;
			int testPosition;
			MaskedTextResultHint resultHint;
			bool result;
			int Int32_out = 0;
			MaskedTextResultHint MaskedTextResultHint_out = MaskedTextResultHint.Unknown;
			mtp = new MaskedTextProvider (@"abc");
			mtp.Add (@"a");
			mtp.Add ('\x61');
			mtp.Add ('\x61', out Int32_out, out MaskedTextResultHint_out);
			result = mtp.Add (@"", out testPosition, out resultHint);
			Assert.AreEqual (true, result, "GenerateAdd_string_int_MaskedTextResultHint_Test#0");
			Assert.AreEqual (MaskedTextResultHint.NoEffect, resultHint, "GenerateAdd_string_int_MaskedTextResultHint_Test#1");
			Assert.AreEqual (1, testPosition, "GenerateAdd_string_int_MaskedTextResultHint_Test#2");
			MaskedTextProviderTest.AssertProperties (mtp, "GenerateAdd_string_int_MaskedTextResultHint_Test", 3, true, false, 1, 0, CultureInfo.GetCultureInfo ("es-ES"), 1, true, false, false, 0, 3, @"abc", true, true, '\x0', '\x5F', true, true, true, @"abc", @"abc", @"abc", @"abc", @"a", @"abc", @"a");

		}
All Usage Examples Of System.ComponentModel.MaskedTextProvider::Add