.net

Best practice for a collection of generic classes

Consider the following code: abstract class SomeClassX<T> { // blah } class SomeClassY: SomeClassX<int> { // blah } class SomeClassZ: SomeClassX<long> { // blah } I want a collection of SomeClassX<T>'s, however, this isn't possible since SomeClassX<int> != SomeClassX<long> and List<SomeClassX<>> isn't allowed. So my solution ...

What's the thread context for events in .Net using existing APIs?

When using APIs handling asynchronous events in .Net I find myself unable to predict how the library will scale for large numbers of objects. For example, using the Microsoft.Office.Interop.UccApi library, when I create an endpoint it gets events when phone events happen. Now let's say I want to create 1000 endpoints. The number of even...

How can I get "Copy to Output Directory" to work with Unit Tests?

When I build a unit test project before the tests are executed the test output is copied to a TestResults folder and then the tests are executed. The issue I'm having is that not all the files in the Debug/bin directory are copied to the TestResults project. How can I get a file that is copied to the Debug/bin directory to also be copi...

Reading RAW image files as GDI+ bitmaps

Is there a good way to read RAW image files (especially Canon CR2 and Adobe DNG files) as GDI+ bitmaps that is reasonably fast? I found an example running under WPF that would read an image using any installed image codec and then display it in an image control. And I modified this example to create a GDI+ bitmap by writing the WPF imag...

Apart from initial cost, are there any other benefits of using MySQL over MSQL server with .net?

I've used both and I've found MySql to have several frustrating bugs, limited support for: IDE integration, profiling, integration services, reporting, and even lack of a decent manager. Total cost of ownership of MSSQL Server is touted to be less than MySQL too (.net environment), but maintaining an open mind could someone point out any...

Is it possible to use MSBuild to build a .NET 1.1 VB project w/ Crystal Reports?

I have a project with Crystal Reports files that doesn't seem to build correctly if I upgrade it to VS 2005 and .NET 2.0. I think the reason is that the new version of Crystal Reports is incompatible with the older report format. Since I am now running Vista, and .NET 2003 doesn't work correctly on Vista, I want to be able to build usi...

Int128 in .Net?

I need to do some large integer math. Are there any classes or structs out there that represent a 128-bit integer and implement all of the usual operators? BTW, I realize that decimal can be used to represent a 96-bit int. ...

SystemIcons default size

What is the default (i.e. native) size of a System.Drawing.SystemIcons icon? ...

How do I determine the dependencies of a .NET application?

Does Dependency Walker work with managed apps? I've downloaded the latest and tried profiling the app, but it just exits without much of an explanation. If it doesn't work with .NET, then is there some other tool that would help me debug a run-time DLL loading issue? ...

HttpListenerRequest where are the POST parameter?

I have search in MSDN and I can't figure where are the POST parameters from HttpListenerRequest? Any idea? *QueryString seem to have only Get parameter not post ...

Fields people capture when logging - log4net

Hi guys I interested in knowing what fields people actual capture and use when logging within their applications when using loggers like log4net. This can range from debugging to testing to production and can be for thick client apps but I am thinking more about semantics of web apps (i.e. asp.net). Also, in the context of web (and ...

What major applications does Microsoft sell which use the .NET framework?

As a programmer, I feel much safer knowing that the frameworks being 'sold' to me are actually in use by their creators to produce real applications, as this gives me some reassurance that they will actually solve some set of problems, and are not just architecture astronautics. I remember years ago in the days of .NET 1.0 and 1.1, ther...

How do you skip default value columns on insert/update in Linq To SQL?

How do you insert/update a column through Linq To SQL and Linq To SQL use the default values? In particular I'm concerned with a timestamp field. I've tried setting that column to readonly and autogenerated, so it stopped trying to put in DateTime.MinValue, but it doesn't seem to be updating on updates. ...

Applications that use .NET

What are your favorite applications, products, or any applications that you know of that use .NET or Asp.NET as their underlying platform? What popular companies do you know of as a .NET shop? This question is related to a few others that I have seen. So I've just made this one as a community wiki to see what kind of a response there is...

Custom URI for HTTPListener?

Is there a way to add a custom prefix/URI that is not http or https? The HTTPListener.Prefixes.Add method only accepts http:// and https:// prefixes. I just don't want to recreate the functionality of this class if I don't have to. ...

Why is OdbcCommand.ExecuteScalar() throwing an AccessViolationException?

I have a block of code intended to pull text descriptions from a database table and save them to a text file. It looks like this (C# .NET): OdbcCommand getItemsCommand = new OdbcCommand("SELECT ID FROM ITEMS", databaseConnection); OdbcDataReader getItemsReader = getItemsCommand.ExecuteReader(); OdbcCommand getDes...

Difference between Char.IsDigit() and Char.IsNumber() in C#

What's the difference between Char.IsDigit() and Char.IsNumber() in C#? ...

how to uppercase date and month first letter of ToLongDateString() result in es-mx Culture ?

currently i obtain the below result from the following C# line of code when in es-MX Culture Thread.CurrentThread.CurrentCulture = Thread.CurrentThread.CurrentUICulture = new CultureInfo("es-mx"); <span><%=DateTime.Now.ToLongDateString()%></span> miércoles, 22 de octubre de 2008 i would like to obtain the ...

which are the best best tutorials, books, software to start and manage a .net Agile Project with No Experience

which are the best tutorials, books, software and practices to start and manage a new .net based Development Project in an Agile way with no experience with it. which methodology is easier to adopt XP|Scrum? ...

CUDA for .net?

I know that there are a lot of CUDA language bindings, such as PyCUDA, but are there any good bindings for .Net? The only one I've seen is this one, but I'd like to know if there are any others. ...