Skip to content

Commit 1c158bc

Browse files
committed
✨ CSharp event handler naming convention added
1 parent b771dff commit 1c158bc

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

csharp/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ List of covered sections:
77
* [Method Naming](../csharp/method-naming.md)
88
* [Variable Naming](../csharp/variable-naming.md)
99
* [Namespaces Naming](../csharp/namespaces-naming.md)
10+
* [Event Handler Naming](../csharp/event-handler-naming.md)
1011

1112
Missing something? Please contribute here by reading [this guide](../docs/CONTRIBUTING.md).

csharp/event-handler-naming.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# C# Naming Convention > Event Handler Naming
2+
3+
## PascalCase
4+
- Capitalize first letter of each word of the event handler
5+
- Begin with the event name then suffix with `EventHandler`
6+
7+
```c#
8+
private void ProductPurchasedEventHandler(object sender, ProductPurchasedEventArgs e)
9+
{
10+
...
11+
}
12+
```

0 commit comments

Comments
 (0)