Top ".net" questions

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

printing all contents of array in C#

I am trying to print out the contents of an array after invoking some methods which alter it, in Java …

c# .net arrays linq
Extracting Path from OpenFileDialog path/filename

I'm writing a little utility that starts with selecting a file, and then I need to select a folder. I'd …

c# .net parsing path
What is [Serializable] and when should I use it?

I found out that some classes use the [Serializable] attribute. What is it? When should I use it? What kinds …

c# .net serialization
Query an XDocument for elements by name at any depth

I have an XDocument object. I want to query for elements with a particular name at any depth using LINQ. …

c# .net xml linq linq-to-xml
How to view the Folder and Files in GAC?

I want to view the folders and sub folders in GAC. Also want to know about adding and removing from …

.net .net-assembly gac
How to return a value from a Form in C#?

I have a main form (let's call it frmHireQuote) that is a child of a main MDI form (frmMainMDI), that …

c# .net winforms parameter-passing
DateTimePicker: pick both date and time

Is it possible to use DateTimePicker (Winforms) to pick both date and time (in the dropdown)? How do you change …

c# .net winforms
What is the correct format to use for Date/Time in an XML file

What format do I use for Date/Time when writing to an XML file using .NET? Do I simply use …

.net xml datetime
What is the purpose of a question mark after a type (for example: int? myVariable)?

Typically the main use of the question mark is for the conditional, x ? "yes" : "no". But I have seen another …

c# asp.net .net types
Get the correct week number of a given date

I have Googled a lot and found a lot of solutions, but none of them give me the correct week …

c# asp.net .net date