CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Peter's Gekko

public Blog MyNotepad : Imho { }

VB (.NET) or C# ? No need to choose

Dan Appleman has published a very neat article on VB.NET and C#. It's not about which one is a better language, which is a non-issue, but does show how to mix the best of both. Using the visual basic namespace in a piece of C# you can use the VB financial functions in your C# code.

<quote>

using Microsoft.VisualBasic;
........
Console.Write("Your payment is: ");
Console.WriteLine(Financial.Pmt(.05/12,    30*12,100000,0,  DueDate.BegOfPeriod).ToString("$0.00")) ;
</quote>

That's what .net is about.

Peter



Comments

Peter van Ooijen said:

Agree but there is no such thing as the C# versus the VB.NET runtime. There is only a Common Language Runtime. In which you can load assemblies with funny names as "Microsoft.VisualBasic". Which could be coded in something like cobol.net. Who knows ? Who cares ?
# December 14, 2004 4:04 AM

Peter's Gekko said:

I am a C# guy. This is a matter of personal preference,&amp;nbsp; I know how to code with VB.NET but just...
# August 2, 2005 9:15 AM

Peter's Gekko said:

I am a C# guy. This is a matter of personal preference,&amp;nbsp; I know how to code with VB.NET but just...
# September 23, 2005 10:24 AM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add
Check out Devlicio.us!

This Blog

Syndication

News