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

Learning c# for VB.NET Developer

I am experienced in .net development using VB. Is there any material
available geared to someone that knows .NET and VB.NET to learn C#?

thanks,
Gary
Nov 16 '05 #1
10 2213
I think a book kind of "Teach yourself C# in 21 days" will do ;)
Otherwise in the SDK'c doc, there are C# specification, tutorial,
documentation:
ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/csref/html/vcoriCSharpTutorials.htm


"GaryB" <gb@nospam.com> wrote in message
news:Oi**************@TK2MSFTNGP10.phx.gbl...
I am experienced in .net development using VB. Is there any material
available geared to someone that knows .NET and VB.NET to learn C#?

thanks,
Gary

Nov 16 '05 #2
alternatively, if the links doesn't work, open .NET SDK help, and in the
search text box type:
"C# tutorial"

there is an entry called like that!

"GaryB" <gb@nospam.com> wrote in message
news:Oi**************@TK2MSFTNGP10.phx.gbl...
I am experienced in .net development using VB. Is there any material
available geared to someone that knows .NET and VB.NET to learn C#?

thanks,
Gary

Nov 16 '05 #3
It's not hard to convert VB.NET to C#. Most of .NET coding is using the
Framework, which is the same for both languages. Just read some basics about
C# syntax. Take some easy VB code, try and modify it to C# and see if it
compiles. Here is a little class I just rewrote in VB that show several
language features.

public class WorkerBee
{
public delegate void UpdateGui(string[] ar);
public event UpdateGui guiFunc = null;

private Thread thd = null;

public volatile bool bStopNow = false;

public WorkerBee(UpdateGui gptr)
{
guiFunc = gptr;
thd = new Thread (new ThreadStart (work));

}
public void Run()
{
thd.Start ();
}
private void work()
{
Debug.WriteLine (string.Format ("work() thd =
{0}",Thread.CurrentThread.GetHashCode()));
int k =0;
string [] sa = new string[10];
for (k = 0; k < 10000; k++)
{
if ((k % 10) == 0 && k > 0)
{
if (bStopNow) break;
if (guiFunc != null)
{
guiFunc(sa);
}
}
sa[k % 10] = string.Format ("string:{0}",k);
}
guiFunc(sa);
sa[0] = "101";
guiFunc(sa);
}
}
Imports System.Threading
Public Class WorkerBee

Public Delegate Sub UpdateGui(ByVal ar() As String)
Public Event guiFunc As UpdateGui

Private thd As Thread

Dim bStopNow As Boolean = False

Public Sub WorkerBee(ByVal gptr As UpdateGui)

AddHandler guiFunc, gptr
thd = New Thread(New ThreadStart(AddressOf work))

End Sub
Public Sub Run()

thd.Start()
End Sub
Private Sub work()

Debug.WriteLine(String.Format("work() thd = {0}",
Thread.CurrentThread.GetHashCode()))
Dim k As Int32 = 0
Dim sa(10) As String
For k = 0 To 100000
if ((k % 10) == 0 && k > 0) then

If (bStopNow) Then Exit For

RaiseEvent guiFunc(sa)
End If
sa(k Mod 10) = String.Format("string:{0}", k)
RaiseEvent guiFunc(sa)
sa(0) = "101"
RaiseEvent guiFunc(sa)
Next
End Sub
End Class
good luck,
kevin aubuchon
"GaryB" <gb@nospam.com> wrote in message
news:Oi**************@TK2MSFTNGP10.phx.gbl...
I am experienced in .net development using VB. Is there any material
available geared to someone that knows .NET and VB.NET to learn C#?

thanks,
Gary

Nov 16 '05 #4
I rather like the Wrox books. The have something for everyone, at every
level and with pretty good tutorial/examples.

MikeY

"GaryB" <gb@nospam.com> wrote in message
news:Oi**************@TK2MSFTNGP10.phx.gbl...
I am experienced in .net development using VB. Is there any material
available geared to someone that knows .NET and VB.NET to learn C#?

thanks,
Gary

Nov 16 '05 #5
Many developers have found our VB.NET to C# converter - Instant C# -
very helpful for this purpose. Download our free (and supported)
Demo Edition at www.instantcsharp.com

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
Nov 16 '05 #6
Learn the following:
1) what "using" blocks do and how to use them
2) The curly-bracket style syntax, and the implications this has on
visibility (i.e. you can see "out" of a block, but you can't see "into" one
3) The fact that you have to put a colon ";" at the end of each line that
you don't want to continue, and if you want to continue a line you just
*don't* put ";" at the end, rather than putting "_" at the end
4) The conditional expression syntax - i.e. "cond ? trueexpression :
falseexpression"

Once you've grasped the above, then you can safely claim you have as much
experience in C# as you do in VB.NET, as the rest is pure framework.

"GaryB" wrote:
I am experienced in .net development using VB. Is there any material
available geared to someone that knows .NET and VB.NET to learn C#?

thanks,
Gary

Nov 16 '05 #7
Bonj <Bo**@discussions.microsoft.com> wrote:
Learn the following:
1) what "using" blocks do and how to use them
2) The curly-bracket style syntax, and the implications this has on
visibility (i.e. you can see "out" of a block, but you can't see "into" one
3) The fact that you have to put a colon ";" at the end of each line that
you don't want to continue, and if you want to continue a line you just
*don't* put ";" at the end, rather than putting "_" at the end
4) The conditional expression syntax - i.e. "cond ? trueexpression :
falseexpression"

Once you've grasped the above, then you can safely claim you have as much
experience in C# as you do in VB.NET, as the rest is pure framework.


I don't think that's true at all. Here are other things:

1) Operator differences (&&, || etc)
2) Loop construct differences (the anatomy of for, foreach etc)
3) The syntax for declarations (of classes, variables, interfaces etc)
4) Unsafe code
5) Operator overloading
6) XML documentation
7) Event declaration and handling

I could go on. Basically, there's an awful lot more to the differences
between VB.NET and C# than the parts you listed. While it's true that
learning the framework is much more important, and that C# as a
language can be learned quite quickly, it takes considerably more than
the points you quoted.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #8
I don't have any files ending in Totorials.htm on my computer. I am running
VS.NET and have the sdk but I can't find it.
Gary
"Lloyd Dupont" <ld@NewsAccount.galador.net> wrote in message
news:OO**************@TK2MSFTNGP12.phx.gbl...
I think a book kind of "Teach yourself C# in 21 days" will do ;)
Otherwise in the SDK'c doc, there are C# specification, tutorial,
documentation:
ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/csref/html/vcoriCSharpTutorials.htm


"GaryB" <gb@nospam.com> wrote in message
news:Oi**************@TK2MSFTNGP10.phx.gbl...
I am experienced in .net development using VB. Is there any material
available geared to someone that knows .NET and VB.NET to learn C#?

thanks,
Gary


Nov 16 '05 #9
Hi GaryB,

Here is the link for Visual C# Language in MSDN:

http://msdn.microsoft.com/library/de...us/cscon/html/
vcoricstartpage.asp

You can try to find much useful information on it.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 16 '05 #10
The following could help you learn C# faster

The words in [] are only for description

End of statement - ;
Method syntax
-------------
sub = void

Method signature - <scope> <return type> <method name> <(parameter
list)>[Method Body -]
{
[Returns] <return> value;
}

// End of Method Syntax - This is a single-line comment
/* This is a multi-line comment */
Example
-------
VB.Net
Public Sub Method1()

End Sub

C#

public void Method1()
{

}

VB.Net
Public Function Method1() As String
Method1="String"
End Sub

C#

public string Method1()
{

return "String";
}

Class Syntax
------------
<scope> [Keyword-]<class> <identifier>
[Class Body - ]
{

}

Example
VB.Net
Public Class MyClass

End Class

C#
public class MyClass
{

}

variable/object declaration - <Scope> <Type> identifier.
variable/object instantiation - <Scope> <Type> identifier=<new> <Type>

Example
VB.Net
Public i as Integer
C#
public int i;

VB.Net
Public ob As New MyClass()
C#
public MyClass ob;
ob=new MyClass();

Remember C# is case-sensitive.

with regards,
J.V.Ravichandran
- http://www.geocities.com/
jvravichandran
- http://www.411asp.net/func/search?
qry=Ravichandran+J.V.&cob=aspnetpro
- http://www.southasianoutlook.com
- http://www.MSDNAA.Net
- http://www.csharphelp.com
- http://www.poetry.com/Publications/
display.asp?ID=P3966388&BN=999&PN=2
- Or, just search on "J.V.Ravichandran"
at http://www.Google.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #11

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

Similar topics

2
by: ggg | last post by:
I'm looking for a complete project/application done with heavy use of of object-oriented programming & design. Preferably something well documented and/or commented so that I can pick it apart...
3
by: pix | last post by:
Hello, I would like to start learning Visual Basic, and I was wondering if there are any recomendations to any ebooks, or actual books for that matter. I have my eye on this book by John Smiley,...
6
by: kneejerkreaction | last post by:
I'm seeking advice on learning .NET I have experience in ASP, HTML, Vb, Vbscript and Javascript but want to learn .NET I also have some experience with SQL Server and Oracle databases. My...
90
by: Jhon smith | last post by:
Hi all,Just wondering are there any problems with learning c from older books,as I have picked up some from 1988,1994,1997,1998. By using books of this age(Im on a tight budget)am I going to...
25
by: Shawn Ferguson | last post by:
I'm in the process of learning .NET but I have an issue. How do you know what CAN exist. What I mean is how does a person know to use the string.todate or something like that? There are so many...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
1
by: Morten Snedker | last post by:
After getting to know VB.NET, I'm now about to learn ASP.NET, since customer requests points in this direction. Naturally, I wish to start up in a proper way. As mentioned I'm familiar with...
5
by: romiro | last post by:
Hi all, I'm a PHP5 developer looking to "broaden my horizons" so to speak by learning a new language. I emphasize the 5 in PHP since I have fully engrossed myself in the full OOP of version 5...
10
by: Michael Reach | last post by:
Can anyone suggest a really good course in Javascript that my son can take online, starting right away? It should be for someone without much programming experience, and I mean a real course, that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.