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

Remove() public method

Removes the last character from the formatted string. (Remove last character in virtual string). On exit the out param contains the position where the operation was actually performed. This position is relative to the test string. The MaskedTextResultHint out param gives more information about the operation result. Returns true on success, false otherwise.
public Remove ( int &testPosition, MaskedTextResultHint &resultHint ) : bool
testPosition int
resultHint MaskedTextResultHint
return bool
        public bool Remove(out int testPosition, out MaskedTextResultHint resultHint)
        {
            int lastAssignedPos = LastAssignedPosition;

            if (lastAssignedPos == invalidIndex)
            {
                testPosition = 0;
                resultHint = MaskedTextResultHint.NoEffect;
                return true; // nothing to remove.
            }

            ResetChar(lastAssignedPos);

            testPosition = lastAssignedPos;
            resultHint = MaskedTextResultHint.Success;

            return true;
        }

Same methods

MaskedTextProvider::Remove ( ) : bool

Usage Example

		public void ToString_bool_bool_int_int_Test00008 ()
		{
			MaskedTextProvider mtp;
			//int Int32_out = 0;
			//MaskedTextResultHint MaskedTextResultHint_out = MaskedTextResultHint.Unknown;
			mtp = new MaskedTextProvider (@"abc");
			mtp.Add (@"a");
			mtp.Remove ();
			mtp.InsertAt ('\x61', 1);
			Assert.AreEqual (@"_", mtp.ToString (true, true, -1, 1), "#0");
			MaskedTextProviderTest.AssertProperties (mtp, "ToString_bool_bool_int_int_Test", 1, true, false, 0, 1, CultureInfo.GetCultureInfo ("es-ES"), 1, true, false, false, -1, 3, @"abc", true, false, '\x0', '\x5F', true, true, true, @" bc", @" bc", @" bc", @"_bc", @"_", @" bc", @"");
		}
All Usage Examples Of System.ComponentModel.MaskedTextProvider::Remove