Replaced StringComparison.InvariantCultureIgnoreCase with OrdinalIgnoreCase
Replaced ASCIIEncoding with UTF8Encoding
Use string.Compare overload with StringComparison argument
Replaced Encoding.ASCII with Encoding.UTF8
Replaced ToShortDate/TimeString with ToString("d") and ("t")
Replaced MemoryStream.GetBuffer() with .ToArray()
Explicitly convert string to char array