new at this, converting a single to a string with option strict on

  • Thread starter Thread starter joshua barrett via DotNetMonster.com
  • Start date Start date
J

joshua barrett via DotNetMonster.com

hey guys im new to programming in general, i was doing fine till i started
to work with option strict on, now i can;lt figure out hwo to get a single
to convert to a string. i thought the .parse class would do it? maybe im
using it wrong?
 
Hi,

Parse is for converting a string to a single. Use ToString to
convert a single to a string

Dim x as single = 1.1
Dim s as string = x.tostring

Ken
 
joshua barrett via DotNetMonster.com said:
hey guys im new to programming in general, i was doing fine till i started
to work with option strict on, now i can;lt figure out hwo to get a single
to convert to a string. i thought the .parse class would do it? maybe im
using it wrong?

\\\
Dim r As Single = 2.2
MsgBox(r.ToString())
MsgBox(CStr(r))
///
 
thx for the quick answers guys!
hopfully ill be able to answer some soon =)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

option strict 5
option strict on 11
Strict On/Off 6
Convert String to GUID that is Compliant with Option Strict 2
RANT: option strict etc 15
Option Strict and .Save with an Image 4
Option Strict On 22
Option Strict On 6

Back
Top