Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

I have a single line of code in VB6 which I wanna convert to .NET:

Here is my VB6 code:

If CDbl(Right(Results, 1)) = 0 Then Rights = 500

I already have converted it and here it is:

If Convert.ToDouble(Results.ToString.Substring(Results.ToString.Length - 1, 1)) = 0 Then Rights = 500

Just to make sure if I converted correctly and there is no shorter/better way specially for Right$ function, please let me know if my conversion is OK?

Thank you very much.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...