[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 563
  • Last Modified:

VB .NET what does Tostring() does

I have this code

Page.Response.Write("User Count : " & Application("userCount").ToString())

and I am not sure why .Tostring () is there and what it actually does. Could someone explain that to me.
Thanks
0
syedasimmeesaq
Asked:
syedasimmeesaq
  • 3
2 Solutions
 
toddbehnkeCommented:
it is the function to convert the data to a string data type.
0
 
toddbehnkeCommented:
or more specifically it is a method that "Returns a String that represents the current Object"
0
 
syedasimmeesaqAuthor Commented:
where can I find the list of all the function that I can use.
Thanks
0
 
toddbehnkeCommented:
Its more about classes and methods than traditional ASP functions really.
Dig around the .Net Framework Class Library and see if that helps any.
http://msdn2.microsoft.com/en-us/library/ms229335(VS.80).aspx
The link is to .NET 2.0 but if you want a different one the links are there on the right side once you get to the page.
0
 
Jaime OlivaresSoftware ArchitectCommented:
every .Net class has a ToString() method, to allow to convert it to a string and be used or combined with other strings.
Also you can do this:

Page.Response.Write(String.Format("User Count : {0}", Application("userCount")))

String.Format() will invoke automatically the ToString() method.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now