diff options
author | Levi Bostian <levi.bostian@gmail.com> | 2015-10-18 12:07:05 -0500 |
---|---|---|
committer | Levi Bostian <levi.bostian@gmail.com> | 2015-10-18 12:07:05 -0500 |
commit | 4fffeac272461ad697dafd42d9405eb9bf434069 (patch) | |
tree | 0129c6a5a9fa67e4b4e3373c4096f703345fdbc3 | |
parent | b1d3bacfa56689eacd90034f8a9d3a9e486998ff (diff) | |
parent | d65e738fc339c7b1481dc88cb1c39d1ec8777b6d (diff) |
Merge pull request #1552 from adback03/master
ruby and csharp code example updates
-rw-r--r-- | csharp.html.markdown | 29 | ||||
-rw-r--r-- | ruby.html.markdown | 1 |
2 files changed, 30 insertions, 0 deletions
diff --git a/csharp.html.markdown b/csharp.html.markdown index 31c0417e..dfdd98de 100644 --- a/csharp.html.markdown +++ b/csharp.html.markdown @@ -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 ``` diff --git a/ruby.html.markdown b/ruby.html.markdown index 4e9f8aee..998b4bf7 100644 --- a/ruby.html.markdown +++ b/ruby.html.markdown @@ -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 |