private byte[] GetBinaryData(string value) { if (rbBase64.Checked) { try { return(System.Convert.FromBase64String(value)); } catch (Exception e) { ShowError("Invalid Base64 value:\n" + e.Message); return(null); } } if (rbHEX.Checked) { try { return(DigitUtils.StringToByteArray(value)); } catch (Exception e) { ShowError("Invalid Base64 value:\n" + e.Message); return(null); } } ShowError("No conversion selected"); return(null); }
static void Main(string[] args) { string filePath = System.IO.Path.GetFullPath(@"..\..\..\files\file1.txt"); DigitUtils digit = new DigitUtils(); var list = digit.getNumbers(filePath); foreach (var num in list) { Console.Write($"{num}\t"); } Console.Read(); }
public void Setup() { digit = new DigitUtils(); }