PC Review


Reply
Thread Tools Rate Thread

Compare Vb.net and C#

 
 
Prateek Sethi[GrapeCity]
Guest
Posts: n/a
 
      22nd Jul 2003
Hi,

Can somebody let me know the differences between vb.net and C# or point me
to an article? I do not need syntax and keyword differences, but an insight
on the funtionality diff. between the two languages/compilers.

Thanks


 
Reply With Quote
 
 
 
 
sridhar
Guest
Posts: n/a
 
      22nd Jul 2003
There are not much differences as functionality and
compilers.MS aim is Language independent. But vey minor
Diff.are exist like

1) we cann't write unmanaged code using VB but it is
possible with C#.

2)C# has XML Comments that allow you to stick XML into the
code to make it self-documenting. This isn't actually a
feature of C#, it's just that someone neglected VB.NET
when they put it in, but it is a smart feature to use when
you want to quickly document assemblies and applications.

3)VB gained >> and << bitwise operators in the latest
version, although it still can't work with unsigned types
so their usefulness is limited.

4)VB has optional parameters, C# doesn't
5)C# has operator overloading, VB doesn't
6)late binding implementation at VB is very easy compared
to C#.

you can also see : support.microsoft.com/?kbid=308470


>-----Original Message-----
> Hi,
>
>Can somebody let me know the differences between vb.net

and C# or point me
>to an article? I do not need syntax and keyword

differences, but an insight
>on the funtionality diff. between the two

languages/compilers.
>
>Thanks
>
>
>.
>

 
Reply With Quote
 
Jon Skeet
Guest
Posts: n/a
 
      22nd Jul 2003
sridhar <(E-Mail Removed)> wrote:
> There are not much differences as functionality and
> compilers.MS aim is Language independent. But vey minor
> Diff.are exist like
>
> 1) we cann't write unmanaged code using VB but it is
> possible with C#.


No it's not. You can write *unsafe* code with C#, but it's still
managed. There's a big difference between unmanaged and unsafe.

--
Jon Skeet - <(E-Mail Removed)>
http://www.pobox.com/~skeet/
If replying to the group, please do not mail me too
 
Reply With Quote
 
Prateek
Guest
Posts: n/a
 
      22nd Jul 2003
Thanks a lot Sridhar!! This is a great help..

"sridhar" <(E-Mail Removed)> wrote in message
news:0a6701c35046$aa5c62e0$(E-Mail Removed)...
There are not much differences as functionality and
compilers.MS aim is Language independent. But vey minor
Diff.are exist like

1) we cann't write unmanaged code using VB but it is
possible with C#.

2)C# has XML Comments that allow you to stick XML into the
code to make it self-documenting. This isn't actually a
feature of C#, it's just that someone neglected VB.NET
when they put it in, but it is a smart feature to use when
you want to quickly document assemblies and applications.

3)VB gained >> and << bitwise operators in the latest
version, although it still can't work with unsigned types
so their usefulness is limited.

4)VB has optional parameters, C# doesn't
5)C# has operator overloading, VB doesn't
6)late binding implementation at VB is very easy compared
to C#.

you can also see : support.microsoft.com/?kbid=308470


>-----Original Message-----
> Hi,
>
>Can somebody let me know the differences between vb.net

and C# or point me
>to an article? I do not need syntax and keyword

differences, but an insight
>on the funtionality diff. between the two

languages/compilers.
>
>Thanks
>
>
>.
>



 
Reply With Quote
 
Prateek
Guest
Posts: n/a
 
      23rd Jul 2003
Thanks to all..

While on the same topic, I would like to give some background of this
question..

I have found that there is a difference in how C# and VB.NET compliers treat
overloaded methods in the derived class. While VB.NET looks for the best
fit, C# fits in the method call to the derived class member if that is
possible. Take a look at the two samples below. Run these and notice the
difference. I would be glad if you could throw some light on this or point
out if I am doing something wrong here.

Thanks,
Prateek

------------------------------------------
//CSubtle.cs
using System;

public class SubtleBase
{
public void Great(int i)
{
Console.WriteLine ("You are in Base:Great Integer " + i.ToString());
}

public void Great(String i)
{
Console.WriteLine ("You are in Base:Great String " + i.ToString());
}
}

public class SubtleDerived : SubtleBase
{
public void Great(Object i)
{
Console.WriteLine ("You are in Derived:Great Object " + i.ToString());
}

public static void Main()
{
int i = 45;
String s = "This is a string";
Object o = "This is an object";

SubtleDerived obj = new SubtleDerived();

obj.Great(i);
obj.Great(s);
obj.Great(o);
}
}
------------------------------------------

------------------------------------------
'VSubtle.vb

Imports System

Public class SubtleBase
public sub Great(i as Integer)
Console.Writeline ("You are in Base:Great Integer " + i.ToString)
End Sub

public sub Great(i as String)
Console.Writeline ("You are in Base:Great String " + i.ToString)
End Sub
End Class

Public Class SubtleDerived
Inherits SubtleBase

public overloads sub Great(i as object)
Console.Writeline ("You are in Derived:Great Object " + i.ToString)
End Sub

public shared Sub Main()
Dim i as Integer = 45
Dim s as String = "This is a string"
Dim o as Object = "This is an object"
Dim obj as new SubtleDerived

obj.Great(i)
obj.Great(s)
obj.Great(o)
End Sub
End Class
------------------------------------------



"Prateek Sethi[GrapeCity]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
Hi,

Can somebody let me know the differences between vb.net and C# or point me
to an article? I do not need syntax and keyword differences, but an insight
on the funtionality diff. between the two languages/compilers.

Thanks



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compare sheet utility that can compare formula too Adam2046 Microsoft Excel Discussion 3 27th Apr 2010 09:26 AM
How do I compare cells and if FALSE compare to next cell in EXCEL =?Utf-8?B?Q2luZGll?= Microsoft Excel Worksheet Functions 0 24th Mar 2006 05:29 PM
String compare doesn't compare? Ken Soenen Microsoft Excel Programming 1 16th Jan 2006 03:40 PM
compare data from one column with another and compare result to yet another Matt Williamson Microsoft Excel Programming 1 25th Sep 2003 08:54 PM
compare data from one column with another and compare result to yet another Matt Williamson Microsoft Excel Worksheet Functions 1 25th Sep 2003 08:54 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:43 PM.