using System; class Program { public static void Main() { ObsoleteMethod(); } [Obsolete] public static void ObsoleteMethod() { } }