Added execution header

This commit is contained in:
2015-02-02 14:34:44 +00:00
parent 98d6b4f249
commit 5b71d275c7

View File

@@ -20,6 +20,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
using System;
using System.Reflection;
namespace SharpHash
{
@@ -27,7 +28,15 @@ namespace SharpHash
{
public static void Main(string[] args)
{
Console.WriteLine("Hello World!");
object[] attributes = typeof(MainClass).Assembly.GetCustomAttributes(typeof(AssemblyTitleAttribute), false);
string AssemblyTitle = ((AssemblyTitleAttribute) attributes[0]).Title;
attributes = typeof(MainClass).Assembly.GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
Version AssemblyVersion = typeof(MainClass).Assembly.GetName().Version;
string AssemblyCopyright = ((AssemblyCopyrightAttribute) attributes[0]).Copyright;
Console.WriteLine("{0} {1}", AssemblyTitle, AssemblyVersion);
Console.WriteLine("{0}", AssemblyCopyright);
Console.WriteLine();
}
}
}