开发者

How to Convert VB hex to c# hex

How do I convert this from VB.Net to c#?

开发者_如何学GoDim dd As String = Hex(ExpiryDate.Value.Day).PadLeft(4, "0")

I tried a conversion tool (It uses the mono project source code they say) http://www.developerfusion.com/tools/convert/vb-to-csharp/

and it came up with this but c# does not like it. - the code that is.

string dd = Conversion.Hex(ExpiryDate.Value.Day).PadLeft(4, "0");

This is the error:-

The name 'Conversion' does not exist in the current context


This might be what you want:

string dd = String.Format("{0:x4}", ExpiryDate.Value.Day);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜