mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 07:12:31 +03:00
Merge pull request #1552 from adback03/master
ruby and csharp code example updates
This commit is contained in:
commit
4fffeac272
@ -913,6 +913,35 @@ on a new line! ""Wow!"", the masses cried";
|
||||
|
||||
public DbSet<Bicycle> Bikes { get; set; }
|
||||
}
|
||||
|
||||
// Classes can be split across multiple .cs files
|
||||
// A1.cs
|
||||
public partial class A
|
||||
{
|
||||
public static void A1()
|
||||
{
|
||||
Console.WriteLine("Method A1 in class A");
|
||||
}
|
||||
}
|
||||
|
||||
// A2.cs
|
||||
public partial class A
|
||||
{
|
||||
public static void A2()
|
||||
{
|
||||
Console.WriteLine("Method A2 in class A");
|
||||
}
|
||||
}
|
||||
|
||||
// Program using the partial class "A"
|
||||
public class Program
|
||||
{
|
||||
static void Main()
|
||||
{
|
||||
A.A1();
|
||||
A.A2();
|
||||
}
|
||||
}
|
||||
} // End Namespace
|
||||
```
|
||||
|
||||
|
@ -41,6 +41,7 @@ You shouldn't either
|
||||
35 / 5 #=> 7
|
||||
2**5 #=> 32
|
||||
5 % 3 #=> 2
|
||||
5 ^ 6 #=> 3
|
||||
|
||||
# Arithmetic is just syntactic sugar
|
||||
# for calling a method on an object
|
||||
|
Loading…
Reference in New Issue
Block a user