.net

Why are unsigned int's not CLS compliant

Why are unsigned int's not CLS compliant. I start to think type-specification is just for performance, and not for correctness. ...

How to access .Net element on Master page from a Content page?

Is it possible to access an element on a Master page from the page loaded within the ContentPlaceHolder for the master? I have a ListView that lists people's names in a navigation area on the Master page. I would like to update the ListView after a person has been added to the table that the ListView is data bound to. The ListView curre...

.NET 3.5 Redistributable -- 200 MB? Other options?

I've been using a lot of new .NET 3.5 features in the work that I've been doing, lately. The application that I'm building is intended for distribution among consumers who will probably not have the latest version (or perhaps any version) of the .NET framework on their machines. I went to go download the .NET 3.5 redistributable package ...

In C#, why can't a List<string> object be stored in a List<object> variable

It seems that a List object cannot be stored in a List variable in C#, and can't even be explicitly cast that way. List<string> sl = new List<string>();List<object> ol;ol = sl; results in Cannot implicitly convert type ‘System.Collections.Generic.List’ to ‘System.Collections.Generic.List’ And then... List<string> sl = new List<string...

Web Services -- WCF vs. Standard

Working on a new project and was wondering was there any benefit with going with a WCF web service over a regular old fashion web service. Visual Studio offers templates for both. What are the differences? Pros / Cons? ...

ASP.NET Master Pages

I've just been learning about master pages in ASP.NET 2.0. They sound great, but how well do they work in practice? Does anybody have experience of using them for a large web site?...

Performance Considerations for throwing Exceptions

I have come across the following type of code many a times, and I wonder if this is a good practice (from Performance perspective) or not: try { ... // some code } catch (Exception ex) { ... // Do something throw new CustomException(ex); } Basically, what the coder is doing is that they are encompassing the exception in a ...

What's the best way to get speakers for my Users Group?

We just started a .NET Users Group in Missoula, MT. It seems hard to get members to speak, but many people like to attend. What is the best way to encourage attenders to become speakers? We usually have two 1-hour presentations per meeting. ...

What are good topics for presentations at .NET Users Groups

What are good things to present on at .NET Users Group meetings? ...

Animation in .NET

What is a good way to perform animation using .NET? I would prefer not to use Flash if possible, so am looking for suggestions of ways which will work to implement different types of animation on a new site I am producing. The new site is for a magician, so I want to provide animated buttons (Cards turning over, etc.) and also embed vi...

Automatically check bounced emails via POP3 ?

Hi all, Can anyone recommend software or even a .net library to develop software, that will check for bounced emails and the reason for the bounce? I get bounced emails into a pop3 account that I can read then... I need it to keep my user database clean from invalid email addresses and want to automate this (mark user as invalid email)...

Anyone know a good workaround for the lack of an enum generic constraint?

What I want to do is something like this: I have enums with combined flagged values. public static class EnumExtension { public static bool IsSet<T>( this T input, T matchTo ) where T:enum //the constraint I want that doesn't exist in C#3 { return (input & matchTo) != 0; } } So then I could do: MyEnum te...

Visual Studio - new "default" property values for inherited controls

I'm looking for help setting a new default property value for an inherited control in Visual Studio: class NewCombo : System.Windows.Forms.ComboBox { public NewCombo() { DropDownItems = 50; } } The problem is that the base class property "DropDownItems" has a 'default' attribute set on it that is a different value (not 50). As a re...

Capture MouseDown event for .NET TextBox

Is there any way to capture the MouseDown even from the .NET 2.0 TextBox control? I know the inherited Control class has the event, but it's not exposed in TextBox. Is there a way to override the event handler? I also tried the OpenNETCF TextBox2 control which does have the MouseDown event exposed, but no matter what I do, it doesn't fi...

What is the value-binding syntax in xaml?

I'm getting all learned up about binding in WPF. I'm having a lot of trouble debugging the parse errors in my xaml, though. Can somebody pretty please tell me what's wrong with this little piece? : <Border Name="TrackBackground" Margin="0" CornerRadius="2" ...

MVC pattern question: Who has what? who calls what?

I am refactoring a project and I want to make it conform to the MVC pattern (model view control). There are three objects: a ServerList (maintains a list of servers that are active) - this guy will be the controller a Form - this is your standard .NET GUI a DatabaseThingy - wrapper class that reads/writes to database. (don't ask me wh...

Printing from a .NET Service

I am working on a project right now that involves receiving a message from another application, formatting the contents of that message, and sending it to a printer. Technology of choice is C# windows service. The output could be called a report, I suppose, but a reporting engine is not necessary. A simple templating engine, like Stri...

Database Migration library for .NET

There are a number of migration libraries for .NET. Which one do you prefer and why? For those of you who haven't heard of migrations. This is something that Ruby on Rails made popular. It is a way to specify your database schema and version in code, and easily "migrate" between versions of your database. Here is an article on .NET ...

.NET Interfaces

Over the past few years I've changed from having a long flowing page of controls that I hid/showed to using a lot of user controls. I've always had a bit of a discussion between co-workers on best practices. Should you have properties that you populate, or use paramterized sub's to load the information in your controls? Part of my fea...

Has anyone run performance benchmarks comparing LINQ

to yesteryear's standards such as nHibernate, good old custom ORM, or something like LLBGenPro? Also, having run the benchmarks, what are your suggestions? ...