-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
24 lines (22 loc) · 729 Bytes
/
Program.cs
File metadata and controls
24 lines (22 loc) · 729 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System;
/// <summary>
/// A partial method has its signature defined in one part of a partial type,
/// and its implementation defined in another part of the type.
///
/// Partial methods enable class designers to provide method hooks,
/// similar to event handlers, that developers may decide to implement or not.
///
/// If the developer does not supply an implementation, the compiler removes the signature at compile time.
/// </summary>
namespace PartialMethods
{
partial class Program
{
partial void OnSomethingHappened(String s);
static void Main(string[] args)
{
Program p = new Program();
p.OnSomethingHappened("What happend?");
}
}
}