Skip to content

Commit e51a45a

Browse files
evildourjskeet
authored andcommitted
Versioning example: add interface member
1 parent 941af4c commit e51a45a

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
public interface ILibraryInterface
2+
{
3+
void Method1();
4+
}
5+
----
6+
public interface ILibraryInterface
7+
{
8+
void Method1();
9+
void Method2();
10+
}
11+
----
12+
public class ClientClass : ILibraryInterface
13+
{
14+
public void Method1()
15+
{
16+
Console.WriteLine("Method1 called");
17+
}
18+
}
19+
20+
public class Program
21+
{
22+
static void Main()
23+
{
24+
new ClientClass().Method1();
25+
}
26+
}
27+
----
28+
# Adding an interface member
29+
30+
Adding a member to an interface definition is a simple breaking change for
31+
both source and binary compatibility.

0 commit comments

Comments
 (0)