1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-10 16:54:33 +02:00

Merge pull request #3700 from apooravc/add-csharp-resource

[csharp/en] Added a resource (tutorial)
This commit is contained in:
Divay Prakash
2020-01-24 19:46:28 +05:30
committed by GitHub

View File

@@ -727,10 +727,10 @@ on a new line! ""Wow!"", the masses cried";
int _speed; // Everything is private by default: Only accessible from within this class. int _speed; // Everything is private by default: Only accessible from within this class.
// can also use keyword private // can also use keyword private
public string Name { get; set; } public string Name { get; set; }
// Properties also have a special syntax for when you want a readonly property // Properties also have a special syntax for when you want a readonly property
// that simply returns the result of an expression // that simply returns the result of an expression
public string LongName => Name + " " + _speed + " speed"; public string LongName => Name + " " + _speed + " speed";
// Enum is a value type that consists of a set of named constants // Enum is a value type that consists of a set of named constants
// It is really just mapping a name to a value (an int, unless specified otherwise). // It is really just mapping a name to a value (an int, unless specified otherwise).
@@ -1091,7 +1091,7 @@ on a new line! ""Wow!"", the masses cried";
// Spell failed // Spell failed
return false; return false;
} }
// Other exceptions, or MagicServiceException where Code is not 42 // Other exceptions, or MagicServiceException where Code is not 42
catch(Exception ex) when (LogException(ex)) catch(Exception ex) when (LogException(ex))
{ {
// Execution never reaches this block // Execution never reaches this block
@@ -1215,7 +1215,7 @@ namespace Csharp7
Console.WriteLine(tt.GetLastName()); Console.WriteLine(tt.GetLastName());
} }
} }
// PATTERN MATCHING // PATTERN MATCHING
class PatternMatchingTest class PatternMatchingTest
{ {
@@ -1315,8 +1315,10 @@ namespace Csharp7
* [C# language reference](https://docs.microsoft.com/dotnet/csharp/language-reference/) * [C# language reference](https://docs.microsoft.com/dotnet/csharp/language-reference/)
* [Learn .NET](https://dotnet.microsoft.com/learn) * [Learn .NET](https://dotnet.microsoft.com/learn)
* [C# Coding Conventions](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/inside-a-program/coding-conventions) * [C# Coding Conventions](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/inside-a-program/coding-conventions)
* [DotNetPerls](https://www.dotnetperls.com/) * [DotNetPerls](http://www.dotnetperls.com)
* [C# in Depth](https://manning.com/skeet3) * [C# in Depth](http://manning.com/skeet2)
* [Programming C# 5.0](http://shop.oreilly.com/product/0636920024064) * [Programming C# 5.0](http://shop.oreilly.com/product/0636920024064.do)
* [LINQ Pocket Reference](http://shop.oreilly.com/product/9780596519254) * [LINQ Pocket Reference](http://shop.oreilly.com/product/9780596519254.do)
* [Windows Forms Programming in C#](https://www.amazon.com/Windows-Forms-Programming-Chris-Sells/dp/0321116208) * [Windows Forms Programming in C#](http://www.amazon.com/Windows-Forms-Programming-Chris-Sells/dp/0321116208)
* [freeCodeCamp - C# Tutorial for Beginners](https://www.youtube.com/watch?v=GhQdlIFylQ8)