private void CheckClrVersion(string filePath) { WhatCanIDoForYou helpme = new WhatCanIDoForYou(); try { txtClrVersion.Font = NormalFont; txtClrVersion.Text = helpme.CheckClrVersion(filePath); } catch (Exception ex) { txtClrVersion.Font = errorFont; txtClrVersion.Text = ex.Message; } }
private static void Main(string[] args) { if (args == null || args.Length == 0) { // Run Windows Form Application.Run(new FrmMain()); } else { string filePath = args[0]; try { WhatCanIDoForYou helpme = new WhatCanIDoForYou(); Console.WriteLine("File: {0}\r\nCLR Version: {1}", filePath, helpme.CheckClrVersion(filePath)); } catch (Exception ex) { Console.WriteLine("Error: {0}", ex.Message); } } }