Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What does float.Parse do

Status
Not open for further replies.

bb11

Programmer
Feb 23, 2005
5
AU
What does "float.Parse" do and what does float by it self do
 
bb11,

float is a value type provided by the .Net. You can create an instance of this type with a value i.e.
Code:
float a = 76;

.Parse is a static method of the float type that allows you to retrieve a value (as a float) from a different value type.

for example:
Code:
float a = 76;
string s = "76";

float b = float.parse(s);

//Produces 'true'
Console.WriteLine("a = b is {0}", a == b);

Hope this helps,

Graeme

"Just beacuse you're paranoid, don't mean they're not after you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top