I use resharper and resharper adviced me to declare one method as static and the another not. But i can't understand why the other method can't be static ?
method recommended to be static
private static string Prehod(string retazec)
{
var pole = retazec.ToCharArray();
var output = "";
char? temp = null;
for (var i = 0; i < pole.Length; i++)
{
if (temp == null)
{
temp = pole[i];
continue;
}
output += pole[i].ToString() + temp.ToString();
temp = null;
}
return output;
}
and method not recommended to be static
public string HashToString(string hash,int dlzka)
{
var hashChar = hash.Substring(0, dlzka*2);
var retazec = "";
for (var i = 0; i < dlzka*2; i++)
{
if(i%2 != 0)
{
retazec += hashChar.Substring(i, 1);
}
}
return retazec;
}