Skip to content

Instantly share code, notes, and snippets.

@jindeveloper
Created August 21, 2020 07:04
Show Gist options
  • Save jindeveloper/4dbbf3d2b522798e79ff0e0b266dd9ea to your computer and use it in GitHub Desktop.
Save jindeveloper/4dbbf3d2b522798e79ff0e0b266dd9ea to your computer and use it in GitHub Desktop.
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