473,402 Members | 2,055 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

ToDecimal

I am just starting to use asp.net and I do not have the
ToDecimal function. Do I have to install a library to
get it?
Jul 19 '05 #1
4 3061

Convert.ToDouble Method Converts a specified value to a
double-precision floating point number.

This is .Net frame work class library. No need of separate
Intallation. At Framework SDK documentation you will get
the details regarding other Convert methods.
-----Original Message-----
I am just starting to use asp.net and I do not have the
ToDecimal function. Do I have to install a library to
get it?
.

Jul 19 '05 #2
"John" <jo******@hotmail.com> wrote
I am just starting to use asp.net and I do not have the
ToDecimal function. Do I have to install a library to
get it?


John,
You can convert to a double by either using the Double's Parse method
or VB.NET's CType (or C# Convert).

Dim s1 As String = "1.1"
Dim d1 As Double = Double.Parse(s1)
Dim d2 As Double = CType(s1, Double)

--

Thanks,
Carl Prothman
Microsoft ASP.NET MVP
http://www.able-consulting.com


Jul 19 '05 #3
"Carl Prothman [MVP]" <ca****@spamcop.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
"John" <jo******@hotmail.com> wrote
I am just starting to use asp.net and I do not have the
ToDecimal function. Do I have to install a library to
get it?

John,
You can convert to a double by either using the Double's Parse

method or VB.NET's CType (or C# Convert).

Dim s1 As String = "1.1"
Dim d1 As Double = Double.Parse(s1)
Dim d2 As Double = CType(s1, Double)

--

Thanks,
Carl Prothman
Microsoft ASP.NET MVP
http://www.able-consulting.com


I think Carl forgot that you were talking about Decimal. Everything
he said about Double will also work for Decimal. (
CarlsMessage.Replace("Double", "Decimal") should take care of it
<grin>)

Scott
Jul 19 '05 #4
> I think Carl forgot that you were talking about Decimal. Everything
he said about Double will also work for Decimal. (
CarlsMessage.Replace("Double", "Decimal") should take care of it
<grin>)


Yup! ;-)

--

Thanks,
Carl Prothman
Microsoft ASP.NET MVP
http://www.able-consulting.com


Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Dr. Paul Caesar - CoullByte (UK) Limited | last post by:
Hi all! I have a windows form that is bound to a dataset. Using VS 2005 & .NET Framework Beta 2. In my dataset I have a colum called Warranty that is a smallint on SQL Server 2000(SP4). ...
2
by: Mike L | last post by:
Convert.ToDecimal(txtTotal.Text) comes back with 0.0000 I want 0.00
4
by: John | last post by:
I am just starting to use asp.net and I do not have the ToDecimal function. Do I have to install a library to get it?
0
by: tfsmag | last post by:
I know how to do summary footers in a gridview... but when i try it in a paged gridview it puts a footer on every page of just the items on that page. Any suggestions on how to get it to work so...
2
by: Gustaf | last post by:
I read some data from an XML file. Some datas need to be converted to decimals. The program is to be used in any country, so sometimes the decimal sign is "." and sometimes ",". How can I make...
2
by: Anan18 | last post by:
Use Integer variables to represent the private data of the class – the numerator and the denominator. Provide a constructor that enables an object of this class to be initialized when it is...
6
by: Bob | last post by:
Hello folks. I use this formating but if the value in dr is a null it generates an error "Object cannot be cast from DBNull to other types." Anybody know how I can deal with nulls? ...
4
by: spartacus | last post by:
I have never understood how to throw exceptions properly. If my method is supposed to return an array, when I try to throw the error "ex.Message.ToString() it won't compile. The method is calling for...
8
by: Lemune | last post by:
Hi, I'm developing window service application on C# 2005. The service is to read a new excel file on certain directory, and process it to database. The service work find on XP. But when I...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.