Created
August 23, 2015 12:12
-
-
Save angelovstanton/f1bf8cd540e5d96ab5d8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class ObsoleteExample | |
{ | |
// Mark OrderDetailTotal As Obsolete. | |
[ObsoleteAttribute("This property (DepricatedOrderDetailTotal) is obsolete. Use InvoiceTotal instead.", false)] | |
public static decimal OrderDetailTotal | |
{ | |
get | |
{ | |
return 12m; | |
} | |
} | |
public static decimal InvoiceTotal | |
{ | |
get | |
{ | |
return 25m; | |
} | |
} | |
// Mark CalculateOrderDetailTotal As Obsolete. | |
[ObsoleteAttribute("This method is obsolete. Call CalculateInvoiceTotal instead.", true)] | |
public static decimal CalculateOrderDetailTotal() | |
{ | |
return 0m; | |
} | |
public static decimal CalculateInvoiceTotal() | |
{ | |
return 1m; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment