Top ".net" questions

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

Maximum number of threads in a .NET app?

What is the maximum number of threads you can create in a C# application? And what happens when you reach …

c# .net multithreading
How do you get the width and height of a multi-dimensional array?

I have an array defined: int [,] ary; // ... int nArea = ary.Length; // x*y or total area This is all well …

c# .net arrays multidimensional-array
How do I set a ViewModel on a window in XAML using DataContext property?

The question pretty much says it all. I have a window, and have tried to set the DataContext using the …

.net wpf xaml mvvm
How can I data bind a list of strings to a ListBox in WPF/WP7?

I am trying to bind a list of string values to a listbox so that their values are listed line …

c# .net wpf windows-phone-7 data-binding
Server.UrlEncode vs. HttpUtility.UrlEncode

Is there a difference between Server.UrlEncode and HttpUtility.UrlEncode?

asp.net .net urlencode
WCF Error - Could not find default endpoint element that references contract 'UserService.UserService'

Any ideas how to fix this? UserService.UserServiceClient userServiceClient = new UserServiceClient(); userServiceClient.GetUsersCompleted += new EventHandler<GetUsersCompletedEventArgs>(userServiceClient_GetUsersCompleted); …

c# .net wcf
An object reference is required to access a non-static member

I'm having this error come up and I'm not sure why... I've tried to look it up, people are saying …

c# .net oop member static
How do I sort an observable collection?

I have a following class : [DataContract] public class Pair<TKey, TValue> : INotifyPropertyChanged, IDisposable { public Pair(TKey key, TValue …

c# .net wpf sorting observablecollection
How to access elements of a JArray (or iterate over them)

I have the following Json gotten from Twitter + token {[ { "trends": [ { "name": "Croke Park II", "url": "http://twitter.com/search?q=%22…

c# .net twitter json.net
Checking if a list is empty with LINQ

What's the "best" (taking both speed and readability into account) way to determine if a list is empty? Even if …

c# .net linq list