Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

seanpm2001/Learn-CSharp

Open more actions menu

Repository files navigation


/C_Sharp_wordmark.svg

Learning C Sharp (C#)

I know little about C# This section will go over all my current knowledge of the C# programming language.

Hello World in C Sharp (C#)

This is how you make a Hello World program in C# there is not much that can be changed.

using System;

Console.WriteLine("Hello, world!");

Comments in C Sharp (C#)

Comments in C# are identical to comments in Java, JavaScript, C, CSS, Google Go, C++, etc..

// This is a single line comment
/* This
is a multiline
comment */
/* Multi-line comments
* can also
* be written
* like this */

Break keyword in C Sharp (C#)

break;

To this day, I am still not entirely sure what the break keyword does, but most languages support it.

/!\ This example has not been tested yet, and may not work

Classes in C Sharp (C#)

C# supports classes. The following is an example of classes in C#

class myCSharpClass {
	static void main() {
		Console.WriteLine("Welcome to C# class");
		break;
	}
	return main();
	break;
}

/!\ This example has not been tested yet, and may not work

Return a function in C Sharp (C#)

C# supports the return keyword. The following is an example of returning a function in C#

public void function1() {
	Console.WriteLine("A functional functioning function");
	break;
}
return function1();

/!\ This example has not been tested yet, and may not work

Integers in C Sharp (C#)

Integers in C# are similar in usage to that of Java, C, and C++ This is how you define them:

int two = 2;
int sixteen = 16;
Console.WriteLine(two ** sixteen);
break;

/!\ This example has not been tested yet, and may not work

Exponentiation in C Sharp (C#)

This example is identical to the above example. It demonstrates how to exponentiate values in C#

int two = 2;
int sixteen = 16;
Console.WriteLine(two ** sixteen);
break;

2^16 = 65,536. The program should return 65,536 (the maximum value of a 16 bit integer)

/!\ This example has not been tested yet, and may not work

Other knowledge of C Sharp (C#)

  1. C# is a DOT NET framework language

  2. C# is a language by Microsoft

  3. C# is very similar to Java. Sometimes, it is commonly joked that C# is Microsoft Java

  4. The only feature of C# I know that differentiates it from Java is boxing and unboxing, and the syntax

  5. C# is named after the musical note C♯ (C Sharp) and the language and the note are pronounced the same

  6. Due to technical restrictions on webpages, the # usually has to be ommitted from the name of pages

  7. C# uses the *.cs file extension

  8. C# is a curly bracket and semicolon language

  9. No other knowledge of the C# programming language


About

A repository for showcasing my knowledge of the C# programming language, and continuing to learn the language.

Topics

Resources

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.