Top ".net" questions

Do NOT use for questions about .NET Core - use [.net-core] instead.

What is the difference between C# and .NET?

May I know what is the difference between C# and .NET? When I think of C#, right away I would …

c# .net
How do I get the AM/PM value from a DateTime?

The code in question is below: public static string ChangePersianDate(DateTime dateTime) { System.Globalization.GregorianCalendar PC = new System.Globalization.GregorianCalendar(); …

c# .net datetime datetime-format gregorian-calendar
How using try catch for exception handling is best practice

while maintaining my colleague's code from even someone who claims to be a senior developer, I often see the following …

c# .net exception exception-handling try-catch
Getting the thread ID from a thread

In C# when debugging threads for example, you can see each thread's ID. I couldn't find a way to get …

c# .net multithreading
Which passwordchar shows a black dot (•) in a winforms textbox?

Short question here: In .Net 4.0 Winforms, how do I use the PasswordChar property of a Textbox to show a common …

c# .net winforms textbox
Remove characters from C# string

How might I remove characters from a string? For example: "My name @is ,Wan.;'; Wan". I would like to …

c# .net
How to show Error & Warning Message Box in .NET/ How to Customize MessageBox

Using C# .NET (Winforms). I want to know how can I show the message boxes with a Ding!! sound & …

c# .net winforms
How do I detect what .NET Framework versions and service packs are installed?

A similar question was asked here, but it was specific to .NET 3.5. Specifically, I'm looking for the following: What is …

.net installation version-detection
Comparing two byte arrays in .NET

How can I do this fast? Sure I can do this: static bool ByteArrayCompare(byte[] a1, byte[] a2) { if (a1.…

c# .net arrays performance j#