.net

Are there any considerations needed to be taken running your .net program on x64 vs x86?

I believe the architecture type (x86 vs x64) is abstracted away for you when making .Net programs, but are there any other considerations that can cause problems? ...

What's the best way to benchmark programs in Windows?

I need to do some performance benchmarks on .NET programs (C#) in Windows, but I haven't done benchmarking much in the Windows world. I've looked into using the Windows 2000/XP Performance monitor with custom counters for this, but I don't think this is quite what I want. Are there any good system facilities for this in Windows XP, or ...

Dynamic .NET language performance?

I understand that IronPython is an implementation of Python on the .NET platform just like IronRuby is an implementation of Ruby and F# is more or less OCaml. What I can't seem to grasp is whether these languages perform closer to their "ancestors" or closer to something like C# in terms of speed. For example, is IronPython somehow "...

Maximum number of threads in a .NET app?

What is the maximum number of threads you can create in a C# application? And what happens when you reach this limit? Is an exception of some kind thrown? ...

How do you pass an object to a windsor container instead of a type?

I have the following class: public class ViewPage<TView,TPresenter> : Page where TView : IView where TPresenter : Presenter<TView> { public ViewPage() { if (!(this is TView)) throw new Exception(String.Format("The view must be of type {0}", typeof(TView))); IWindsorContainer container = new WindsorContainer(); container.A...

Is there any performance difference in using .resx file and satellite assembly?

Which is the best way to go forward while building a localized aspx web application, .resx files of satellite assemblies? Is there any performance comparisons available any where on web? ...

Does WWF provide BPEL integration?

I've found a CTP for such integration from Microsoft, but it seems it never was officially released and supported. Also - Do you know a list of WWF to BPEL activities mapping? Thanks ...

How you design Controller layer of MVC design pattern in .NET

Here are my thoughts: The purpose of using MVC is seperation of concerns and testability of gui logic. View should be able to work with different models and model should be able to work with different views. I think controller class must implement an interface for mocking/testing reasons and view should call controller methods through th...

.NET: What is the status of the Castle Project?

Clicking through to the download-page if see that the last version of the download is over one year old and it's also "just" a Release Candidate of version 1.0. There are really no news on any development. Yes, you can find newer versions from the nightly builds, but that's not a real serious option. Also, the "getting-started" and des...

Targeting both 32bit and 64bit with Visual Studio in same solution/project

Greetings. I have a little dilemma on how to set up my visual studio builds for multi-targeting. Background: c# .NET v2.0 with p/invoking into 3rd party 32 bit DLL's, SQL compact v3.5 SP1, with a Setup project. Right now, the platform target is set to x86 so it can be run on Windows x64. The 3rd party company has just released 64 bit...

How to join int[] to a character separated string in .NET?

I have a array of integers: int [] number = new int[] { 2,3,6,7 }; What is the easiest way of converting these in to a single string where the number are separated by a character (like: "2,3,4,7")? I'm in C# and .NET 3.5. ...

Which you think is the best class design tool for .net?

Do you use visual studio's class diagram generator? Or, do you suggest any other better tool? The main features I'm expecting out of such a tool are: Ability to generate C#/VB.net code skeletons Ability to reverse engineer C#/VB.net code (Ability to update class diagram if I modified my source code) Integration with Visual Studio, if ...

Best Performing ORM for .NET

I'm curious if anyone has done any performance comparisons with any or all of the main players in the .NET ORM space. Specifically I'm interested in comparisons between the following: Linq to SQL NHibernate LLBL Gen Entity Framework Though it seems people don't really consider Linq to SQL a true ORM, I am still including it in this l...

Change WPF DataTemplate for ListBox item if selected

I need to change the DataTemplate for items in a ListBox depending on whether the item is selected or not (displaying different/more information when selected). I don't get a GotFocus/LostFocus event on the top-most element in the DataTemplate (a StackPanel) when clicking the ListBox item in question (only through tabbing), and I'm out ...

Organizing classes into namespaces.

Are there some principles of organizing classes into namespaces? For example is it OK if classes from namespace N depends on classes from N.X? And if classes from N.X depends on classes from N? ...

What is your smallish web development company setup?

I work for a small web development company (only 2 to 3 developers) that work on a wide range of projects for different customers (everything from CMS's to eCommerce sites). Usually we work on our own projects but occasionally we need to work together on one. We use subversion as our source control software and sites are developed in ....

How do you store an Integer and Boolean key value pair in an un-ordered collection?

I need to store a list of key value pairs of (integer, boolean) in .NET When I use a dictionary it re-orders them. Is there a built in collection that will handle this. ...

What is the best SNMP library to use with .NET?

What are the best SNMP libraries to use with .NET? Specifically for listening for traps or sending set or get requests. ...

Any way to un-register a WPF dependency property?

I'm running into an unusual problem in my unit tests. The class I'm testing creates a dependency property dynamically at runtime and the type of that dependency property can vary depending on the circumstances. While writing my unit tests, I need to create the dependency property with different types and that leads to errors because you ...

When creating a web control should you override OnLoad or implement Page_Load

When you create a new web user control in visual studio it by default adds the Page_Load event. What is the advantage to using this rather than overriding the base OnLoad event on the control? Is it just that the Page_Load event fires before OnLoad? ...