System.ComponentModel.MaskedTextProvider.TestSetChar C# (CSharp) Метод

TestSetChar() приватный Метод

Tests if the character at the specified position in the test string can be set to the value specified, and sets the character to that value if the test is successful. The position specified is relative to the test string. The MaskedTextResultHint out param gives more information about the operation result. Returns true on success, false otherwise.
private TestSetChar ( char input, int position, MaskedTextResultHint &resultHint ) : bool
input char
position int
resultHint MaskedTextResultHint
Результат bool
        private bool TestSetChar(char input, int position, out MaskedTextResultHint resultHint)
        {
            if (TestChar(input, position, out resultHint))
            {
                if (resultHint == MaskedTextResultHint.Success || resultHint == MaskedTextResultHint.SideEffect) // the character is not to be escaped.
                {
                    SetChar(input, position);
                }

                return true;
            }

            return false;
        }