Hack Forums
[C#] Basic Fundamentals of C# and Learning C# - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [C#] Basic Fundamentals of C# and Learning C# (/showthread.php?tid=758747)

Pages: Pages 1 2


Basic Fundamentals of C# and Learning C# - Pulser - Oct 22, 2010

C#


The Basics:
- C# is a multi-paradigm programming language used all over the world.

- Visual C# is the most commonly used implementation of C#.

-"C#" was created by Microsoft and was approved as a standard by Ecma.

- The leader of the C# development team is Anders Hejlsberg. Currently, the latest version of C# is "C# 4.0".

Sources:
Code
http://en.wikipedia.org/wiki/C_Sharp_(programming_language)

http://windowsdevcenter.com/pub/a/oreilly/windows/news/hejlsberg_0800.html

http://www.MrPredictablesBrain.com

The Visual C# IDE

If you have ever programmed in Visual Basic the C# IDE will look extremely familiar to you. Thats because, for the most part, it is.

Spoiler (Click to View)

Spoiler (Click to View)

Everything you need to begin coding in C# comes packed together with a little ribbon on it. You can compile your programs, create your programs, and debug your programs, all from the IDE.

Download:
You can download Visual Studio 2010 which includes Visual C#:
http://www.microsoft.com/express/windows/

You can also download Visual C# 2010 for free:
http://www.microsoft.com/express/Downloads/#2010-Visual-CS

You can purchase Visual Studio Ultimate:
http://www.microsoft.com/visualstudio/en-us/products/2010-editions/ultimate

C# vs Visual Basic

There is a lot of controversy over which is a better language. To put it plain and simple, the answer is, neither.

Visual Basic and C# both have extremely different syntax. I personally feel C# has a more organized a professional syntax compared to Visual Basic, but I also feel Visual Basic has a neater, easier to comprehend syntax. The syntax difference is not an argument momentous proportion.

Syntax differences:

If Statements:

C#
Code
{
    if (textBox1.Text == "Hackforums")
    {
    MessageBox.Show("Syntax Differences Example!");

    }
    else
    {
    MessageBox.Show("Do You See Them?");
    }
  }

Visual Basic:
Code
If TextBox1.Text = "Hackforums" Then
    MessageBox.Show("Syntax Differences")
  Else
    MessageBox.Show("Do You See Them?")
  End If

So, whether you prefer C# syntax or VB syntax, it is mainly personal preference.

From a comparison article:
Code
Features of C# not found in Visual Basic .NET

-Allows blocks of unsafe code (like C++/CLI) via the unsafe keyword.
-Partial Interfaces
-Iterators and the yield keyword
-Multi-line comments (note that the Visual Studio IDE supports multi-line commenting for Visual Basic .NET)
-Static classes (Classes which cannot contain any non-static members, although VB's Modules are essentially sealed static classes with additional semantics)
-Can use checked and unchecked contexts for fine-grained control of overflow/underflow checking

When choosing between C# and Visual Basic, mainly, it is always personal preference. However, while coding in C#, you will notice it is very similar to Java. So, if you plan on working in java, it may help to learn C#.

Learning C#:

There are thousands upon thousands of ways to learn C# out there. You can read e-book, buy books, read articles, watch videos, anything!

E-Books
Accelerated C#
Sams teach yourself C#

Websites
HomeAndLearn
MSDN
cplus
C# Corner

My Tutorials:
C# is by far my favorite programming language, so I have taken it upon myself to do my best to help my fellow forum users. If anyone has programming questions or needs programming help, DO NOT hesitate to PM me!

Beginner Tutorials:
Concatenation In C#
Variables In C#
Events In C#
Loops In C#
Comments In C#

Intermediate Tutorials:
Parsing In C#
Math In C#
C# OFD
Try And Catch In C#
Switch Statements In C#
If Statements In C#
Arrays In C#
Classes In C#
SubStrings In C#
Hashtables In C#
BackGround Workers In C#

Advanced Tutorials:
Please Stay Tuned

Conclusion:
So, whether you prefer C#, C++, Java, or Visual Basic, it doesn't really matter. We all have our personal preferences and we will all code great things together in our own language of choice!

Please! If you need any help, contact me! I am online quite often and I will always be willing to try to help you.

Until Next Time,

-Predictable


* - BaussHacker - Oct 22, 2010

I like the VB/C# thing.

As I always said.
VB is the lazy way for a c# coder.
If u can c#, then VB would be easy to learn.
If u can vb, then c# would be much easier to learn, because is only some small changes.

But good work of finding the links eg.

But it seems like ur just post hunting or reputation hunting by spamming many topics instead in one topic.


* - Pulser - Oct 22, 2010

(Oct 22, 2010 02:23 PM)_CookieCoder Wrote:  I like the VB/C# thing.

As I always said.
VB is the lazy way for a c# coder.
If u can c#, then VB would be easy to learn.
If u can vb, then c# would be much easier to learn, because is only some small changes.

But good work of finding the links eg.

But it seems like ur just post hunting or reputation hunting by spamming many topics instead in one topic.

Thanks a lot for the first comment, glad you enjoyed it.


* - Pulser - Oct 25, 2010

Quick B ump in case someone is in need of a good read.


* - Charny - Oct 25, 2010

Thanks for this useful thread :).

I <3 C#


* - ident - Oct 25, 2010

vb is lazy? Interesting statement..


* - Pulser - Oct 25, 2010

(Oct 25, 2010 01:59 PM)Charny Wrote:  Thanks for this useful thread :).

I <3 C#

Thanks a lot for the comment Charny, glad to see an excellent coder such as yourself checked out my thread :D.


* - Pulser - Oct 31, 2010

Quick B*ump, I'm sure someone can find this useful.


* - Pulser - Nov 7, 2010

Quick B*ump, since Ive been seeing quite a few C# threads lately.


* - tflo - Nov 7, 2010

Tons of people asking for C# help, some people are PM'ing me for what ever reason now. I just redirect them here lol.


* - Pulser - Nov 7, 2010

(Nov 7, 2010 10:33 AM)Vanquish Wrote:  Tons of people asking for C# help, some people are PM'ing me for what ever reason now. I just redirect them here lol.

Thanks a lot for the good comment. Glad to see people are coming around to C#.


* - RoXaN - Nov 12, 2010

great job man i like your work really u explane eveything here i like your work


* - Pulser - Nov 12, 2010

(Nov 12, 2010 04:08 PM)RoXaN Wrote:  great job man i like your work really u explane eveything here i like your work

Thanks man, I hope its helpful!


* - Allergen - Jul 2, 2011

Good tut! Do you know any good open source programs written in C#? Wanna learn with it.


* - hgdfhsdgdfgdfh - Jul 2, 2011

Very nice tutorial. It nice to see there are people using C# too. If I post something C# related almost nobody usually looks it or uses because seems that almost all people here use VB.NET.