473,378 Members | 1,544 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,378 software developers and data experts.

Compare Vb.net and C#

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
Jul 19 '05 #1
4 4101
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 meto an article? I do not need syntax and keyword differences, but an insighton the funtionality diff. between the two languages/compilers.
Thanks
.

Jul 19 '05 #2
sridhar <sd******@hotmail.com> 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 - <sk***@pobox.com>
http://www.pobox.com/~skeet/
If replying to the group, please do not mail me too
Jul 19 '05 #3
Thanks a lot Sridhar!! This is a great help..

"sridhar" <sd******@hotmail.com> wrote in message
news:0a****************************@phx.gbl...
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 meto an article? I do not need syntax and keyword differences, but an insighton the funtionality diff. between the two languages/compilers.
Thanks
.

Jul 19 '05 #4
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]" <pr******@grapecity.com> wrote in message
news:eV**************@tk2msftngp13.phx.gbl...
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

Jul 19 '05 #5

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

Similar topics

13
by: MrCoder | last post by:
Hey guys, my first post on here so I'll just say "Hello everbody!" Ok heres my question for you lot. Is there a faster way to compare 1 byte array to another? This is my current code //...
5
by: Megan | last post by:
Hi everybody- I'm helping a friend with a music database. She has an old one and is creating a new one. She wants to compare records and fields in the old database with records and fields in the...
8
by: Vincent | last post by:
has any one seen a program to compare mdbs'. I have ran into a few of them, but none seem to really do that job. Basically what I need to do is, take 2 access mdb's and check the differences...
9
by: geronimo_me | last post by:
Hi, I am atempting to compare part of a field with the whole of another field in access. Is this possible? Basically I have 2 tables with the following info: Table1 Field1 = MR.
11
by: Russ Green | last post by:
How does this: public TimeSpan Timeout { get { return timeout; } set { timeout = value; if(timeout < licenseTimeout) licenseTimeout = timeout; }
1
by: Linda | last post by:
Hi, Is there a way to do a "text" (rather than "binary") compareison with the "like" operator, without changing the global "Option Compare" setting? I don't want to risk breaking many, many...
17
by: Mark A | last post by:
DB2 8.2 for Linux, FP 10 (also performs the same on DB2 8.2 for Windoes, FP 11). Using the SAMPLE database, tables EMP and EMLOYEE. In the followng stored procedure, 2 NULL columns (COMM) are...
5
by: antani | last post by:
I need to implement a function with a argument that is a compare function. This compare function must be several for every necessity. For example , I would like a compare function to analyze...
26
by: neha_chhatre | last post by:
can anybody tell me how to compare two float values say for example t and check are two variables declared float how to compare t and check please help me as soon as possible
1
by: Lambda | last post by:
I defined a class: class inverted_index { private: std::map<std::string, std::vector<size_t index; public: std::vector<size_tintersect(const std::vector<std::string>&); };
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.