Created
August 21, 2020 07:04
-
-
Save jindeveloper/4dbbf3d2b522798e79ff0e0b266dd9ea 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
using System; | |
using System.Diagnostics; | |
namespace CSharp_Attributes_Walkthrough.My_Custom_Attributes | |
{ | |
[Serializable] | |
public class Product | |
{ | |
public string Name { get; set; } | |
public string Code { get; set; } | |
[Obsolete("This method is already obselete. Use the ProductFullName instead.")] | |
public string GetProductFullName() | |
{ | |
return $"{this.Name} {this.Code}"; | |
} | |
[Conditional("DEBUG")] | |
public void RunOnlyOnDebugMode() | |
{ | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment