public void CalucMethod() { var basic = new BasicMethods(); var text1 = basic.GetConsoleText("Input some text. Then show hash."); var hash = text1.GetHashCode(); Console.WriteLine(hash); //synamon = -353814788 var text2 = basic.GetConsoleText("Input any number."); if (text2.GetType() == typeof(int)) { text2 = basic.GetConsoleText("Please input some number..."); } var n = int.Parse(text2) + 1; setData = new int[n]; for (int i = 0; i < n; i++) { setData[i] = i; } Console.WriteLine(Sum(setData, x => x % 2 == 0)); }
public int GetHash() { var text1 = basic.GetConsoleText("Input some text. Then show hash."); hash = text1.GetHashCode(); Console.WriteLine(hash); //synamon = -353814788 return(hash); }