mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-04-27 07:33:57 +00:00
add CSharp resource
This commit is contained in:
parent
ef1ccd2b0f
commit
b2e762307e
@ -725,10 +725,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).
|
||||||
@ -1089,7 +1089,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
|
||||||
@ -1213,7 +1213,7 @@ namespace Csharp7
|
|||||||
Console.WriteLine(tt.GetLastName());
|
Console.WriteLine(tt.GetLastName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// PATTERN MATCHING
|
// PATTERN MATCHING
|
||||||
class PatternMatchingTest
|
class PatternMatchingTest
|
||||||
{
|
{
|
||||||
@ -1320,3 +1320,4 @@ namespace Csharp7
|
|||||||
* [ASP.NET Web Forms Tutorials](http://www.asp.net/web-forms/tutorials)
|
* [ASP.NET Web Forms Tutorials](http://www.asp.net/web-forms/tutorials)
|
||||||
* [Windows Forms Programming in C#](http://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)
|
||||||
* [C# Coding Conventions](http://msdn.microsoft.com/en-us/library/vstudio/ff926074.aspx)
|
* [C# Coding Conventions](http://msdn.microsoft.com/en-us/library/vstudio/ff926074.aspx)
|
||||||
|
* [freeCodeCamp - C# Tutorial for Beginners](https://www.youtube.com/watch?v=GhQdlIFylQ8)
|
||||||
|
Loading…
Reference in New Issue
Block a user