什么是VB的升序()和CHR()函数在C#中的相同呢? [英] What's the equivalent of VB's Asc() and Chr() functions in C#?

查看:242
本文介绍了什么是VB的升序()和CHR()函数在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屋!

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