什么是VB的升序()和CHR()函数在C#中的相同呢? [英] What's the equivalent of VB's Asc() and Chr() functions in C#?
问题描述
VB有几个本地函数的字符转换为ASCII值,反之亦然 - 升序()和CHR()
VB has a couple of native functions for converting a char to an ASCII value and vice versa - Asc() and Chr().
现在我需要在C#中等同的功能。什么是最好的方法是什么?
Now I need to get the equivalent functionality in C#. What's the best way?
推荐答案
您总是可以添加一个参考Microsoft.VisualBasic程序,然后使用完全相同的方法:<一href=\"http://msdn.microsoft.com/en-us/library/microsoft.visualbasic.strings.chr.aspx\">Strings.Chr和<一个href=\"http://msdn.microsoft.com/en-us/library/microsoft.visualbasic.strings.asc.aspx\">Strings.Asc.
You could always add a reference to Microsoft.VisualBasic and then use the exact same methods: Strings.Chr and Strings.Asc.
这是得到确切相同的功能最简单的方法。
That's the easiest way to get the exact same functionality.
这篇关于什么是VB的升序()和CHR()函数在C#中的相同呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!