.net

What are the key strengths of ASP.NET Webforms?

What are the key strengths of ASP.NET Webforms (2.0-3.5)? I'm not looking for comparisons to other frameworks, I'm just am looking for feedback on ASP.NET as it stands today. ...

Reading datagridview

I populated a datagridview from a datatable. How do I read from the datagridview when the application is running? ...

Reporting Services Line Graph: How to better control the smoothed curve.

I have a report that I built for a client where i need to plot x 0-100, y 0-100. Lets imagine I have these points: 0,0 2,24 50,70 100,100 I need to represent these as a smoothed line chart, as the application of it is a dot gain graph for printing presses. Heres the problem. The line draws fine from 100,100 (top right) down to 2,24. B...

Multiple Constructors with complex logic

In C#, if you have multiple constructors, you can do something like this: public MyClass(Guid inputId, string inputName){ // do something } public MyClass(Guid inputId): this(inputId, "foo") {} The idea is of course code reuse. However, what is the best approach when there is a bit of complex logic needed? Say I want this contruc...

Unit-testing COM written in .NET

Is there a way to unit-test COM-visible .NET assemblies from .NET (not via direct .NET assembly reference)? When i add reference in my test project to the COM component whitten in .NET it complains. ...

Creating a shiny Graphic/Gloss Effect

I would like to programmatically create a gloss effect on an Image, kinda like on the Apple-inspired design that the Web has adopted when it was updated to 2.0 Beta. Essentially this: Now, I see two approaches here: I create one image which has an Alpha channel with the gloss effect, and then I just combine the input and the gloss al...

Use of the Exception class in c#

Errors that occur deep down in a data access layer or even higher up, (say within ADO.net operations for example) rarely make much sense to an end user. Simply bubbling these errors up to a UI and displaying them will usually achieve nothing except frustration for an end user. I have recently employed a basic technique for reporting err...

Object Memory Analysis in .NET

Is there a tool or a way to find out how much memory consumed by each DLL or object in .NET? The more detail it analyzes the better. Thanks. ...

What does "DateTime?" mean in C#?

I am reading a .Net book, and in one of the code examples there is a class definition with this field: private DateTime? startdate What does "DateTime?" mean? ...

VisualStudio using BootCamp/VMWare on OS X

Just bought a 2.4GHz Intel Core 2 Duo iMac with 2GB of memory and a 320GB hard drive. I plan on doing some .net development on it using a BootCamp/VMWare combo since VMWare grants access to the bootcamp partition. What is a recommended size for a BootCamp partition and how much memory should I give VMWare? Any pitfalls to watch out for?...

Logic and its application to Collections.Generic and inheritance

Everything inherits from object. It's the basis of inheritance. Everything can be implicitly cast up the inheritance tree, ie. object me = new Person(); Therefore, following this through to its logical conclusion, a group of People would also be a group of objects: List<Person> people = new List<Person>(); people.Add(me); people.Add(...

C# - Good Books/Tutorials for the advanced .net developer?

I was just reading through the Hidden Features of C# thread, and there were a lot of really neat tricks that I had never even heard of. But there wasn't really a whole lot of depth to them all. It got me to wondering what kind of books and tutorials are out there that teach more advanced topics (Delegates, Lambdas, Threading, etc) and a...

Limiting a group of checkboxes to a certain amount of checks

I have a group of checkboxes that I only want to allow a set amount to be checked at any one time. If the newly checked checkbox pushes the count over the limit, I'd like the oldest checkbox to be automatically unchecked. The group of checkboxes all use the same event handler shown below. I have achieved the functionality with a Queue, ...

How to serve files from IIS 6 on Windows Server 2003?

I have files with extensions like ".dae" , ".gtc" , etc. When I try to hit these files over http, the server returns a 404, but they are in the directories. However I can serve readily known file extensions; if i just rename them to say, xml, they are accessible. Any suggestions for what the problem may be? ...

Are there any Common Lisp implementations for .Net?

Related to my other CL question. ...

What is the best way to collect/report unexpected errors in .NET Window Applications?

I am looking for a better solution than what we currently have to deal with unexpected production errors, without reinventing the wheel. A larger number of our products are WinForm and WPF applications that are installed at remote sites. Inevitably unexpected errors occur, from NullReferenceExceptions to 'General network errors'. Thus...

Prevent .NET from "lifting" local variables

I have the following code: string prefix = "OLD:"; Func<string, string> prependAction = (x => prefix + x); prefix = "NEW:"; Console.WriteLine(prependAction("brownie")); Because the compiler replaces the prefix variable with a closure "NEW:brownie" is printed to the console. Is there an easy way to prevent the compiler from lifting th...

Anyone familiar with a good "sticky windows" library for Winforms?

I want to recreate the stickiness and snapping of windows, like it is implemented in Winamp. The basic premise is, when you drag a window and it comes close to another one, it will snap to it and will stick. When you move it the two will move together. I need it for a MDI application. ...

What are some good microcontroller development boards to learn the .Net micro framework?

Excluding the Micro Framework Emulator ;) ...

Best graphic library for .NET/Mono

I am looking for a high-performance graphic library for .NET and Mono. I have taken a look at Tao framework and, while it is very complete, it's quite lacking in terms of usability. It should be cross-platform compatible. What other alternatives worked for you? ...