diff options
author | Martin Schimandl <martin.schimandl@gmail.com> | 2015-10-24 07:28:36 +0200 |
---|---|---|
committer | Martin Schimandl <martin.schimandl@gmail.com> | 2015-10-24 07:28:36 +0200 |
commit | 28f71ffcccc6d69d4eb6fc2de0f384fe708362f5 (patch) | |
tree | 824a79dba743213cef1297a870c97c88e61b6c63 /csharp.html.markdown | |
parent | 543f10b5626a600b27f5fb70212720a17a4f190e (diff) | |
parent | ab67a8f4c29309d7fd5e0b1bd3255fe695beb8cf (diff) |
Merge remote-tracking branch 'adambard/master'
Diffstat (limited to 'csharp.html.markdown')
-rw-r--r-- | csharp.html.markdown | 29 |
1 files changed, 29 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 ``` |