[Solved] Which statement is more efficient?
[ad_1] try var firstChar = dr[“Value”].ToString()[0]; var ok = firstChar == ‘y’ || firstChar=”Y”; and make some performance-tests – but I don’t think that this will really be a issue at all. PS: assuming that the string is not empty – if this might be an issue make it var value = dr[“Value”].ToStrin(); var firstChar … Read more