c#确定字符串输入为char或hex格式 [英] c# determining a string input is in char or hex format
问题描述
大家好,
我有四个文本框,用户可以在其中输入< code> char</code>或在< code> hex</code>中格式.用户将输入的值是分隔符值,用于将记录导出到文件中.
但这可以有两个例外,例如< code> \ n</code>和< code> \ t</code>用户也可以输入导出格式.
现在的问题是如何确定用户已输入十六进制或字符格式的值.这样我就可以转换为一种标准格式,并将其排队以便导出.
谢谢
Hi All,
I have four textboxes where user can enter value either in <code>char</code> or in <code>hex</code> format. The value which user will enter is a delimiter value to export records into file.
But this can have two exceptions like <code>\n</code> and <code>\t</code> can also be inputed by user for export format.
Now the problem is how to determine that user has inputed value in hex or char format. So that I will convert into one standerd format and queue it for export.
Thanks
推荐答案
只需在您的表单上放置一个无线电控件,并让您的用户指定他/她要输入的内容.
Just put a radio control on your form and make your user specify which he/she is entering.
这篇关于c#确定字符串输入为char或hex格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!