Skip to content
This repository was archived by the owner on Jun 26, 2026. It is now read-only.

Commit 0beb770

Browse files
committed
Deprecate old methods
1 parent 2292246 commit 0beb770

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/Utils.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,18 @@
22

33
public static class Utils
44
{
5+
[Obsolete("Use Greeting(string firstName, string lastName) instead.")]
56
public static string Greet(string firstName, string lastName) => $"Hello, {firstName} {lastName}!";
67

8+
[Obsolete("Use Greeting(string name) instead.")]
79
public static string Greet(string name) => $"Hello, {name}!";
810

11+
[Obsolete("Use Greeting() instead.")]
912
public static string Greet() => $"Hello, World!";
1013

14+
public static string Greeting(string firstName, string lastName) => $"Hello, {firstName} {lastName}!";
15+
16+
public static string Greeting(string name) => $"Hello, {name}!";
17+
1118
public static string Greeting() => $"Hello, World!";
1219
}

0 commit comments

Comments
 (0)