How can I allow only 0 or 1 to be entered in a TextBox?

后端 未结 3 1401
鱼传尺愫
鱼传尺愫 2021-01-12 08:56

How can I limit the TextBox control to only allow the values 0 and 1?

Thanks. And I have one more question: How can I disable put text from clipboard in my textbox c

3条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-12 09:33

    You may want to see the answer to this related question:

    C# Input validation for a Textbox: float

提交回复
热议问题