.net

Is there a .NET library for universal audio file decoding?

Do you know of any .NET library which can decode several types of audio files? Ideally, it should be platform agnostic, so it can be used with .NET and Mono - on Windows and *NIX. I already tortured Google searching for a library which meets my needs, but unfortunately I could not find anything. So before writing a lot of wrapper classe...

Is there a S.M.A.R.T. Library for .NET or Java?

I asked a somewhat related question but I want it to make it more concrete and 'programming' oriented, so here it goes: Does any body know, if there is a .NET, JAVA or any other Framework, library, .jar file or what ever: to access S.M.A.R.T. Statistics? Thanks! ...

Proper place to call an event?

I have a Windows Form project that I've just started. On the form I have a listbox that I'm loading with Products. When someone double clicks a Product, I want it to raise a ProductChanged event. Other things in my project will subscribe to this event and update things like other parts of the GUI when the Product changes. My question i...

Fastest way to convert a possibly-null-terminated ascii byte[] to a string?

I need to convert a (possibly) null terminated array of ascii bytes to a string in C# and the fastest way I've found to do it is by using my UnsafeAsciiBytesToString method shown below. This method uses the String.String(sbyte*) constructor which contains a warning in it's remarks: "The value parameter is assumed to point to an array re...

C# / F# Performance comparison

Is there any C#/F# performance comparison available on web to show proper usage of new F# language? ...

What are the consequences of not closing database connection after an error?

I have an application that is causing a lot of headaches. It's a .NET app connecting to SQL Server 2005 via a web service. The program has grid that is filled by a long running stored procedure that is prone to timing out. In the case when it does time out and a SqlException is thrown, there is no execption handling to close the connecti...

What's the difference between AddConcreteType and TheDefaultIsConcreteType in StructureMap?

I'm setting up StructureMap and it seems like everything I want to do there are two ways to do it and it's unclear to me what the difference is between them. For instance, what's the difference between these two lines: StructureMapConfiguration.ForRequestedType<IConsumer>().AddConcreteType<Consumer>(); StructureMapConfiguration.ForReq...

Is the mono .NET project included in latest release of most popular linux distros?

I'm wondering if mono.net is included in the default installation of Ubuntu, Kubuntu, and Fedora, and other popular distros? If so, does anyone have a good reason why NOT to use it to develop a new GUI application targeted mainly for linux? ...

What language features (1 per answer please) should be added to VB.NET in future versions?

What languages feature (1 per answer please) should be added to VB.NET in future versions? Update: where possible provide links to examples of language feature as used elsewhere. ...

How do I convert an M4A file to an MP3 or WMA file programmatically?

Greetings, I'm trying to find either a free .NET library or a command-line executable that lets me convert M4A files to either MP3s or WMA files. Please help :). ...

StringCollection or an Object container?

I recently built an API and was often asked to replace the StringCollections i was returning by objects containing a single property, The reason being that it was easier to bind with a listview or other controls in ASP.Net. Since the API was used by the web application, the Web service and the dataloader I decided on keeping the StringC...

Specifying the type of ArrayList's elements

I thought that there was some way in .net 3.0 to give an array list a type so that it didnt just return Object's but I'm having trouble doing so. Is it possible? If so, how? ...

What is the point of using a Logging framework?

I think I might be missing the point of having a logging framework for your application. In all the small apps I've always written a small "Logging" class and just pass log messages to a method in it which is written to a file. What is the purpose of a 3rd party logging framework like log4net? Is it thread safety with logging write ...

How do I convert a .NET console application to a Winforms or WPF application

I frequently start with a simple console application to try out an idea, then create a new GUI based project and copy the code in. Is there a better way? Can I convert my existing console application easily? ...

With what GUI framework is the Mono .NET Windows.Forms implemented?

With what GUI framework is the Mono .NET Windows.Forms implemented? Example: KDE, Gnome, X11 itself? ...

Is there one API to handle the Task Scheduler in XP and Vista?

I have a couple applications that I would like to be able to add scheduled tasks from within them. I've been Googling for how to add tasks in both XP and Vista. Apparently, Vista has a new Task Scheduler that is very different from the one in XP. Does anybody know if there is a single API to tackle both of them, or do I have to code for...

Most Useful Attributes in C#

I know that attributes are extremely useful. There are some predefined ones such as [Browsable(false)] which allows you to hide properties in the properties tab. Here is a good question explaining attributes: http://stackoverflow.com/questions/20346/c-what-are-attributes What are the predefined attributes (and their namesapce) you actua...

Bluetooth APIs in Windows/.Net?

I am in the process of writing a Bluetooth scanner that locates and identifies mobile devices in the local vicinity. Is this something that I can accomplish using C#, or do I need to drop down into the C/C++ APIs? My application is targeting Windows XP and Vista. Pointers are appreciated. Thanks! ...

Speed of DataSet row/column lookups?

Recently I had to do some very processing heavy stuff with data stored in a DataSet. It was heavy enough that I ended up using a tool to help identify some bottlenecks in my code. When I was analyzing the bottlenecks, I noticed that although DataSet lookups were not terribly slow (they weren't the bottleneck), it was slower than I expect...

WCF Service authorization patterns

Hi all, I'm implementing a secure WCF service. Authentication is done using username / password or Windows credentials. The service is hosted in a Windows Service process. Now, I'm trying to find out the best way to implement authorization for each service operation. For example, consider the following method: public EntityInfo GetEnt...