Top ".net" questions

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

DataGrid get selected rows' column values

I'm trying to get the values of each column of a selected row in a DataGrid. This is what I …

c# .net wpf datagrid
What causing this "Invalid length for a Base-64 char array"

I have very little to go on here. I can't reproduce this locally, but when users get the error I …

.net asp.net exception viewstate
How to get value of checked item from CheckedListBox?

I have used a CheckedListBox over my WinForm in C#. I have bounded this control as shown below - chlCompanies.…

c# .net winforms checkedlistbox
Token based authentication in Web API without any user interface

I am developing a REST API in ASP.Net Web API. My API will be only accessible via non-browser based …

c# .net authentication asp.net-web-api http-token-authentication
Best way to get whole number part of a Decimal number

What is the best way to return the whole number part of a decimal (in c#)? (This has to work …

c# .net decimal int
System.Threading.Timer in C# it seems to be not working. It runs very fast every 3 second

I've a timer object. I want it to be run every minute. Specifically, it should run a OnCallBack method and …

c# .net timer
Visual Studio build fails: unable to copy exe-file from obj\debug to bin\debug

Update: A sample project reproducing this bug can be found here at Microsoft Connect. I have also tested and verified …

c# .net winforms visual-studio
Adding Text to DataGridView Row Header

Does C# allow you to add a String to a RowHeader in a DataGridView? If so, how is it accomplished? …

c# .net winforms datagridview
Remove trailing zeros

I have some fields returned by a collection as 2.4200 2.0044 2.0000 I want results like 2.42 2.0044 2 I tried with String.Format, but it …

c# .net decimal
How can I generate UUID in C#

I am creating an .idl file programmatically. How do I create UUIDs for the interfaces and Methods Programmatically. Can I …

c# .net visual-studio-2008 com uuid