
Detect UTF-8 or UTF-16 BOM in a Stream using C#
Was detecting a file stream if it was Unicode encoded or not, so though I would share the code. Let say you an xml file that you need to detect if it has the Unicode BOM in the file. If…
Practical guides on AI agents, LLM security, C#/.NET and Cloud, from Taswar Bhatti

Was detecting a file stream if it was Unicode encoded or not, so though I would share the code. Let say you an xml file that you need to detect if it has the Unicode BOM in the file. If…

Lots of developers confuse the var keyword in C# with JavaScript. The var keyword was introduced in C# 3.0, and it is basically implicitly defined but is statically defined, var are resolved at compile time not at run-time. The confusion…

Here is a quick way to detect if a text is in Canadian Aboriginal Syllabic in C#. It is just an extension method that would detect if your string is in that range by using regex. public static bool IsInuktitut(this…
Read more: C# detect inuktitut characters Canadian Aboriginal Syllabics