Convert.ToInt32(e.KeyChar).ToS ... [英] Convert.ToInt32(e.KeyChar).ToS...

查看:92
本文介绍了Convert.ToInt32(e.KeyChar).ToS ...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此代码在文本框eventproceduer下可用,所以它显示的是什么。

this code available under a textbox eventproceduer so what is it show.

推荐答案

一个数字。



不是一个非常有用的数字,而是一个数字。



e.KeyChar是一个字符 - 它是被按下的键的Unicode值。

ToInt32将char转换为整数值 - 字符的Unicode编号

和ToString将其转换为字符串。



因此,如果按a键,您将获得Unicode值a:97。如果Caps已启用,则您将获得Unicode值A:65。
A number.

Not a very useful number, but a number.

e.KeyChar is a char - it's the Unicode value of the key that was pressed.
ToInt32 converts the char to an integer value - the Unicode number of the character
And ToString converts that to a string.

So if you press the "a" key, you will get the Unicode value of "a": 97. If Caps is on, then you will get the Unicode value of "A": 65.


这篇关于Convert.ToInt32(e.KeyChar).ToS ...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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