Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [c#]

C# (pronounced "see sharp") is a high-level, statically typed, multi-paradigm programming language developed by Microsoft. C# code usually targets Microsoft's .NET ecosystem, which include .NET, .NET Framework, .NET MAUI, and Xamarin among others. Use this tag for questions about code written in C# or about C#'s formal specification.

c#
102 votes
9 answers
36k views

Passing data to Master Page in ASP.NET MVC

What is your way of passing data to Master Page (using ASP.NET MVC) without breaking MVC rules? Personally, I prefer to code abstract controller (base controller) or base class which is passed to all ...
Łukasz Sowa's user avatar
  • 1,287
2647 votes
59 answers
1.0m views

Deep cloning objects

I want to do something like: MyObject myObj = GetMyObj(); // Create and fill a new object MyObject newObj = myObj.Clone(); And then make changes to the new object that are not reflected in the ...
NakedBrunch's user avatar
  • 49.1k
5 votes
1 answer
4k views

Font rendering libraries for C# / dot-NET?

Are there any free, third-party libraries for rendering arbitrarily scaled and rotated text in dot-NET applications? Although native GDI+ allows for text scaling and rotation, its methods for ...
0 votes
2 answers
385 views

Remoting facilities on Visual Studio 2008

I'm toying with my first remoting project and I need to create a RemotableType DLL. I know I can compile it by hand with csc, but I wonder if there are some facilities in place on Visual Studio to ...
Vinko Vrsalovic's user avatar
  • 337k
0 votes
3 answers
706 views

Reading files in use and system files on Windows XP & Vista using .NET

I have this idea for a free backup application. The largest problem I need to solve at the moment is how to access files which are being used or are system files. I would like the application to be ...
2 votes
6 answers
5k views

XML to Excel (2007) Ideas using Windows XP, and C#.Net

I have a dataset that I have modified into an xml document and then used a xsl sheet to transform into an Excel xml format in order to allow the data to be opened programatically from my application. ...
Trevor Abell's user avatar
1 vote
2 answers
855 views

Assistance porting commctrl commands to C#

In a C++ app, I have an hWnd pointing to a window running in a third party process. This window contains controls which extend the COM TreeView control. I am interested in obtaining the CheckState of ...
Kenn's user avatar
  • 2,449
3 votes
8 answers
14k views

Calling base.Dispose() automatically from derived classes

Edit - New Question Ok lets rephrase the question more generically. Using reflection, is there a way to dynamically call at runtime a base class method that you may be overriding. You cannot use ...
Philibert Perusse's user avatar
4 votes
4 answers
1k views

Is there a specification-based testing framework for C# .Net 2.0?

For example, Reductio (for Java/Scala) and QuickCheck (for Haskell). The kind of framework I'm thinking of would provide "generators" for built-in data types and allow the programmer to define new ...
EfForEffort's user avatar
  • 55.8k
19 votes
12 answers
37k views

Blocking dialogs in .NET WebBrowser control

I have a .NET 2.0 WebBrowser control used to navigate some pages with no user interaction (don't ask...long story). Because of the user-less nature of this application, I have set the WebBrowser ...
95 votes
29 answers
74k views

What is cool about generics, why use them?

I thought I'd offer this softball to whomever would like to hit it out of the park. What are generics, what are the advantages of generics, why, where, how should I use them? Please keep it fairly ...
4 votes
11 answers
2k views

C# Datatype for large sorted collection with position?

I am trying to compare two large datasets from a SQL query. Right now the SQL query is done externally and the results from each dataset is saved into its own csv file. My little C# console ...
MaxGeek's user avatar
  • 1,105
1 vote
2 answers
620 views

Cleanest way to implement collapsable entries in a table generated via asp:Repeater?

Before anyone suggests scrapping the table tags altogether, I'm just modifying this part of a very large system, so it really wouldn't be wise for me to revise the table structure (the app is filled ...
Aaron's user avatar
  • 464
60 votes
14 answers
78k views

How to double buffer .NET controls on a form?

How can I set the protected DoubleBuffered property of the controls on a form that are suffering from flicker?
Ian Boyd's user avatar
  • 253k
3 votes
1 answer
9k views

Using Outlook API to get to a specific folder

I'm trying to write some C# code to get to a specific folder in an Outlook mailbox. I have the following code: Outlook.Application oApp = new Outlook.Application(); Outlook.NameSpace oNS = oApp....
user avatar

15 30 50 per page