.net

Are there any .net equivalents to Rails fixtures?

I'm looking for a project/tool that will insert data into a database before a test and roll it back after a test has run. I know that ruby on rails has yaml fixtures, so I was hoping there is a project out there for .net projects. ...

Resharper 4.0 vs Slick Edit. Which one is the best.

Lets list their differences(strengths + weaknesses) and find out. ...

In .NET, what if something fails in the catch block, will finally always get called?

Hi, In a try/catch/finally block like: try { } catch() { // code fails here } finally { } So if there is an exception in the catch block, will finally always get called? What if there is no finally, will the code after the catch block get run? ...

What DI/IoC framework should I learn next?

I've used Spring and Spring.NET quite a bit, but I would like to see what else is out there. Can anyone recommend a good Java or .NET framework that I could try to learn? ...

.NET assembly not loading from NTVDM

I have a VDD dll that's loaded by a DOS program running inside the NTVDM. This dll uses C++/CLI and references a .NET assembly. All in all, the loading process is something like this: NTVDM runs: prntsr.com which uses VDD RegisterModule to load: prnvdd.dll which references .NET assembly: prnlib.dll The prntsr.com...

Signing a VB.NET application

Do I have to sign my VB.NET applications? I'm getting an error: SignTool reported an error 'Keyset does not exist' But have no interest in signing anything as the project is small and will only be used internally to my department. I could create a temporary key. But why would I want to? Thanks. ...

How to change LINQ O/R-M table name/source during runtime?

I've got a database, and an entityset created by the O/R-Mapper, using all this with LINQ. In the O/R-Mapper I need to enter a table name (source) for every table, which is being used for the SQL generated by LINQ. In the .dbml file it looks like this: <Table Name="dbo.Customers" Member="Customers"> Now I'd like to change this table ...

Developers who have experience of .NET 3.0 or greater, what features would you recommend to look at first ?

There are quite a few features a .NET developer needs to brush up on to get up to speed. I am still on 2.0, probably becuase of the industry I work in, where Banks tend to hold back on using bleeding edge technologies (in my experience). Developers who have experience of .NET 3.0 or greater, what features (both language and framework...

Separating a string into substrings

I want to separate a string consisting of one or more two-letter codes separated by commas into two-letter substrings and put them in a string array or other suitable data structure. The result is at one point to be databound to a combo box so this needs to be taken into account. The string I want to manipulate can either be empty, cons...

What are the "OEM" keys in the System.Windows.Forms.Keys enumeration?

A friend was having trouble figuring out how to assign "Ctrl + +" as a shortcut key to a ToolStripMenuItem. I pointed out that the Keys.OemPlus key would work and the display string for the shortcut needed to be set, but the Keys enumeration mystifies me. What's the deal with these "OEM" keys? I've done a little searching and it seems...

Castle Windsor: suppress exceptions thrown by Resolve()

When resolving a component which the Windsor container cannot find, an exception is thrown. StructureMap has a TryGetInstance method, which returns null of it can't find the requested component. Does Castle Windsor has something like this? Or am I forced to catch these exceptions (I don't like that, because of the performance overhead ...

Alternate UniqueId generation technique

In the application, when special types of objects are created, I need to generate a unique-id for each of them. The objects are created thro' a factory and have a high possibility of being created in a 'bulk' operation. I realize that the "Random" from the framework is not so 'random' after all, so I tried appending the time-stamp as fol...

Working with VS2008/3.5 ASP AJAX site on a 2.0sp1/AJAX Extesnion 1.0 server????

I am currently developing in 3.5 (building to 3.5 as I am using LINQ) and deploying my code to a 2.0 server. I have been successful in this so far, but now I am trying to utilize some of the ASP AJAX tools and I am running into an error I can't seem to get around. First I received "Unknown server tag 'asp:ScriptManager'." To whi...

Getting the path of a ClickOnce File Association

I've using ClickOnce and I'm struggling with file associations. I can set up the association. Double-clicking an associated file even launches the application. ...However... I don't know how to get access to the path of the file clicked to launch the App. Has anyone come across this before? ...

Salting and Hashing Passwords using Linq To SQL

I need to salt and hash some passwords so that I can store them safely in a database. Do you have any advice or ideas as to how best to do this using Linq To SQL? ...

Setting objects to nothing

This is something i seeem to get a different answer for, every time i ask a developer. So i thought it would be a good question for the overflow to see what everyone does. If you have a sqlClient.sqlconnection object, in the cleanup code (finally block etc) do you dispose of the object or do you set it to nothing, or both? I've always...

C# .NET 3.5 : How to invoke an event handler and wait for it to complete

I have a class containing a worker thread which receives data from a queue in a loop. Another part of the app sinks an event from this class, which the class raises for each queue item. These events are fired asynchronously, so at busy times the other part of the app can be processing several events at once. This should be fine but we...

CI: Hudson with .Net vs CruiseControl.Net

I work for a .net shop looking to integrate a CI server. From what I've seen, Hudson seems to be the most popular choice. Considering we are a .net only shop, will Hudson present any hurdles that CC.NET will not? ...

What is the generic alternative of Array?

In C# some collections such as ArrayList and HashTable have generic alternatives which are List<T> and Dictionary<TKey, TValue>. Does Array also have a generic alternative? ...

How does .Net Framework versions handle backwards compatibility

I know that XP didn't ship with a version of .NET Framework and I'm fairly certain that .NET 2.0 shipped with Vista. My question is, will installing .Net 2.0 on XP also install support for .Net 1.1 applications as well? Also, is vista 1.1 compatible out of the box. ...