c#确定字符串输入为char或hex格式 [英] c# determining a string input is in char or hex format

查看:292
本文介绍了c#确定字符串输入为char或hex格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有四个文本框,用户可以在其中输入< 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆