Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / September 2007

Tip: Looking for answers? Try searching our database.

meaning

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
vinnie - 11 Sep 2007 15:21 GMT
Does this mean Convert?

double Amout = 123;

decimal value = (decimal)Amount;

What will be value after that? 123?
Thanks
PvdG42 - 11 Sep 2007 15:27 GMT
> Does this mean Convert?
>
[quoted text clipped - 4 lines]
> What will be value after that? 123?
> Thanks

123 stored as a decimal, which is not the same way a double is stored.
Alex Meleta - 11 Sep 2007 15:33 GMT
Hi vinnie,

That means casting, with decimal result 123.
Convert it's a System.Convert

Regards, Alex
[TechBlog] http://devkids.blogspot.com

v> Does this mean Convert?
v>
v> double Amout = 123;
v>
v> decimal value = (decimal)Amount;
v>
v> What will be value after that? 123?
v> Thanks
Ignacio Machin ( .NET/ C# MVP ) - 11 Sep 2007 15:36 GMT
Hi,

> Does this mean Convert?

Not really, you are converting it but the name of the mechanism is casting.
So you are doing a cast,  It's not the same that using one of the
Convert.ToXXXX methods

I do remember a thread a few days ago regarding cast/Convert take a look in
the archives for some interesting threads about the subject.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.