.net

What does "yield break;" do in C#?

I have seen this syntax in MSDN, but I don't know what it does. Does anyone know? ...

How much to log within an application??? How much is too much...

Hi guys Just wondering how much people log within their applications??? I have seen this: "I typically like to use the ERROR log level to log any exceptions that are caught by the application. I will use the INFO log level as a "first level" debugging scheme to show whenever I enter or exit a method. From there I use th...

How can I manipulate the DOM from a string of HTML in C#?

For the moment the best way that I have found to be able to manipulate DOM from a string that contain HTML is: WebBrowser webControl = new WebBrowser(); webControl.DocumentText = html; HtmlDocument doc = webControl.Document; There are two problems: Requires the WebBrowser object! This can't be used with multiple threads; I need som...

Addin extra properties to MembershipProvider

I am using SqlMemberShipProvider and it works well, but I wish that the MembershipUser had some additional properties such as FirstName, LastName, Phone Number, etc. What is the best way to go about this? Do I have to create a custom membership provider or is there a better way to add additional functionality to users? ...

Amazon EC2 for Windows worth it?

Amazon announced cloud hosting for Windows goes public beta today. EC2 Windows Pricing The pricing doesn't seem that cheap over colocation of your own server. Is this a revolutionary step towards the obvious future of hosting? Does anyone have any first hand experience using .net on an amazon virtual box? Cheapest pricing btw is 12...

Interprocess communication in .NET

I have a core .NET application that needs to spawn an abitrary number of sub processes. These processes need to be able to access some form of state object in the core application. What is the best technique? I'll be moving a large amount of data between processes (Bitmaps), so it needs to be fast. ...

What add-in/workbench framework is the best .NET alternative to Eclipse RCP?

I'm looking for a plugin-based application framework that is comparable to the Eclipse Plugin Framework, which to my simple mind consists of: a core plugin management framework (Equinox / OSGI), which provides the ability to declare extension endpoints and then discover and load plugins that service those endpoints. (this is different...

How to do intra-application communication in .NET

What's the best way to pass data from one Windows Forms app (an office plugin) to another (exe written in C#) in C#? ...

iBatisNet with c#.Net 3.0

Does any body know where to get iBatisNet with DomSqlBuilder in C#.Net and Sql Server provider? ...

What's the best way to extract a one-dimensional array from a rectangular array in C#?

Say I have a rectangular string array (stringarray[rows, columns] - not a jagged array). What's the best way to extract a one-dimensional array from this (either a single row or a single column)? I can do this with a for loop, of course, but I'm hoping .NET has a more elegant way built in. Bonus points for converting the extracted str...

.NET library for working with mobile devices eg PDA

Does anyone know any good .net libraries for working with PDAs and such? I mainly looking for something that will allow me to copy files to/from devices and do some registry work on the device. The PDAs are running windows mobile 5 & 6 I have been using the OpenNETCF.Desktop.Communication.RAPI library in a couple of my apps but I wa...

Invoke default browser from C#?

How to invoke the default browser with an URL from C#? ...

What does it take to be a better OO programmer?

I’ve almost 6 years of experience in application development using .net technologies. Over the years I have improved as a better OO programmer but when I see code written by other guys (especially the likes of Jeffrey Richter, Peter Golde, Ayende Rahien, Jeremy Miller etc), I feel there is a generation gap between mine and their designs....

Date time format from string?

How do I convert a string to DateTime format? For example, if I had a string like: "24/10/2008" How do I get that into DateTime format ? ...

Wrapping StopWatch timing with a delegate or lambda?

I'm writing code like this, doing a little quick and dirty timing: var sw = new Stopwatch(); sw.Start(); for (int i = 0; i < 1000; i++) { b = DoStuff(s); } sw.Stop(); Console.WriteLine(sw.ElapsedMilliseconds); Surely there's a way to call this bit of timing code as a fancy-schmancy .NET 3.0 lambda rather than (God forbid) cutting ...

How to make consistent dll binaries across VS versions ?

For instance, winsock libs works great across all versions of the visual studio. But I am having real trouble to provide a consistent binary across all the versions. The dll compiled with VS 2005 won't work when linked to an application written in 2008. I upgraded both 2k5 and 2k8 to SP1, but the results haven't changed much. It works so...

what is the fastest way to generate a unique set in .net 2

I have what is essentially a jagged array of name value pairs - i need to generate a set of unique name values from this. the jagged array is approx 86,000 x 11 values. It does not matter to me what way I have to store a name value pair (a single string "name=value" or a specialised class for example KeyValuePair). Additional Info: There...

What's the 'obj' directory for in .NET?

We're having a discussion..what exactly is the purpose of the 'obj' directory in .NET? ...

.NET: How to check the type within a generic typed class?

Hello everybody! How do I get the type of a generic typed class within the class? An example: I build a generic typed collection implementing ICollection< T>. Within I have methods like public void Add(T item){ ... } public void Add(IEnumerable<T> enumItems){ ... } How can I ask within the method f...

Detect .NET Framework 3.5 SP1 Dependency (cmp. 3.5 w/o SP1)

I'm using 3.5 SP1 on my machine, while our customers currently use 3.5 without SP1. I don't know any way in VS2008 to target the solution or project to 3.5 without SP1, only the 3.5 with SP1 I have installed. If we use functions or constructors not available in 3.5 w/o SP1 the code will not work properly. That is, I want to detect at c...