From 5b71d275c7e884069c7dd54f6e9b2a57d7420657 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Mon, 2 Feb 2015 14:34:44 +0000 Subject: [PATCH] Added execution header --- SharpHash/Program.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/SharpHash/Program.cs b/SharpHash/Program.cs index 3504c0d..7b80a7c 100644 --- a/SharpHash/Program.cs +++ b/SharpHash/Program.cs @@ -20,6 +20,7 @@ // along with this program. If not, see . 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(); } } }