将int转换为char [英] converting int to char

查看:103
本文介绍了将int转换为char的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我如何使用Microsoft.VisualBasic dll或任何其他dll将一个整数转换为等效的ascii字符而不是

(我只想引用< br $>
System.dll)。


谢谢。


-Nikhil

Hi all,
How can I convert an integer to its equivalent ascii character without
using Microsoft.VisualBasic dll or any other dll(I want to reference only
System.dll).

Thanks.

-Nikhil

推荐答案

Nikhil。


你试过吗

char c =(char)13;


HTH

Alex


" Nikhil Patel" < NI ******** @ aol.com>在消息中写道

news:en ************** @ TK2MSFTNGP10.phx.gbl ...
Nikhil.

did you try

char c = (char)13;

HTH
Alex

"Nikhil Patel" <ni********@aol.com> wrote in message
news:en**************@TK2MSFTNGP10.phx.gbl...
大家好,
如何使用Microsoft.VisualBasic dll或任何其他dll(我只想引用
System.dll)将整数转换为等效的ascii字符。

谢谢。

-Nikhil
Hi all,
How can I convert an integer to its equivalent ascii character without
using Microsoft.VisualBasic dll or any other dll(I want to reference only
System.dll).

Thanks.

-Nikhil



谢谢Alex,

不幸的是我正在使用VB.Net不是C#。


我试过了


CType(10,Char)


在VB.Net中。但它返回1。

" AlexS" < SA *********** @ SPAMsympaticoPLEASE.ca>在消息中写道

新闻:%2 **************** @ TK2MSFTNGP10.phx.gbl ...
Thanks Alex,
Unfortunately I am using VB.Net not C#.

I tried

CType(10, Char)

in VB.Net. But it returned "1".
"AlexS" <sa***********@SPAMsympaticoPLEASE.ca> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Nikhil。

你有没有尝试过

char c =(char)13;

HTH
Alex

; Nikhil Patel < NI ******** @ aol.com>在消息中写道
新闻:en ************** @ TK2MSFTNGP10.phx.gbl ...
Nikhil.

did you try

char c = (char)13;

HTH
Alex

"Nikhil Patel" <ni********@aol.com> wrote in message
news:en**************@TK2MSFTNGP10.phx.gbl...
大家好,
怎么能我将一个整数转换为等效的ascii字符
而不使用Microsoft.VisualBasic dll或任何其他dll(我想引用
只有System.dll)。

谢谢。 />
-Nikhil
Hi all,
How can I convert an integer to its equivalent ascii character without using Microsoft.VisualBasic dll or any other dll(I want to reference only System.dll).

Thanks.

-Nikhil




Nikhil,

有你看过ChrW?


Dim ch As Char = ChrW(10)


希望这会有所帮助

Jay


" Nikhil Patel" < NI ******** @ aol.com>写在消息

新闻:uw ************** @ tk2msftngp13.phx.gbl ...
Nikhil,
Have you looked at ChrW?

Dim ch As Char = ChrW(10)

Hope this helps
Jay

"Nikhil Patel" <ni********@aol.com> wrote in message
news:uw**************@tk2msftngp13.phx.gbl...
谢谢Alex,
我在VB.Net中尝试了CType(10,Char)

。但它返回1。

" AlexS" < SA *********** @ SPAMsympaticoPLEASE.ca>在消息中写道
新闻:%2 **************** @ TK2MSFTNGP10.phx.gbl ...
Thanks Alex,
Unfortunately I am using VB.Net not C#.

I tried

CType(10, Char)

in VB.Net. But it returned "1".
"AlexS" <sa***********@SPAMsympaticoPLEASE.ca> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Nikhil。

你有没有尝试

char c =(char)13;

HTH
Alex

Nikhil Patel < NI ******** @ aol.com>在消息中写道
新闻:en ************** @ TK2MSFTNGP10.phx.gbl ...
Nikhil.

did you try

char c = (char)13;

HTH
Alex

"Nikhil Patel" <ni********@aol.com> wrote in message
news:en**************@TK2MSFTNGP10.phx.gbl...
大家好,
怎么能我将一个整数转换为其等效的ascii字符而不使用Microsoft.VisualBasic dll或任何其他dll(我只想引用System.dll)。

谢谢。

-Nikhil
Hi all,
How can I convert an integer to its equivalent ascii character without using Microsoft.VisualBasic dll or any other dll(I want to reference only System.dll).

Thanks.

-Nikhil





这篇关于将int转换为char的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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