.net

FindBugs for .Net

In Java is this nice tool called FindBugs. Is there something similar in .Net? ...

Record Video of Screen using .NET technologies

Is there a way to record the screen, either desktop or window, using .NET technologies. My goal is something free. I like the idea of small, low cpu usage, and simple, but would consider other options if they created a better final product. In a nutshell, I know how to take a screenshot in C#, but how would I record the screen, or area...

How to subtract one bitmap from another in C#/.NET?

I have two bitmaps, produced by different variations of an algorithm. I'd like to create a third bitmap by subtracting one from the other to show the differences. How can this be done in .NET? I've looked over the Graphics class and all its options, including the ImageAttributes class, and I have a hunch it involves the color matrix or ...

What is the best method to find the newest last modified time of a folder of files?

I have a folder with subfolders of files. I would like to get the newest filename by modified time. Is there a more efficient way of finding this short of looping through each folder and file to find it? ...

How to programmatically bring a laptop into Sleep mode.

What API or tools can I use to query the capabilities of the system and choose the most appropriate on for putting the PC to Sleep, Hibernate or shutdown mode? Thanks for any pointers. ...

ASP.NET: Web Site or Web Application?

When I start a new ASP.NET project in Visual Studio 2008, I can either create a new ASP.NET Web Site or an ASP.NET Web Application. What's the difference between these two project types? Why would I choose one over the other? If I'm using Visual Studio 2005 instead of Visual Studio 2008, is the answer different? If I'm using Visual St...

Java/JRuby on Rails vs .NET 3.5... feel like I'm doing it wrong

I'm planning to develop a web-services (SOAP to C++ client) in Java with Metro/Hibernate and front it up with a web-site written in JRuby on Rails, connecting Java modules through JRuby and generally through a database. I already wrote some code and set up everything. Now, I've heard that .NET 3.5 is really powerful and after some read...

Change Assembly Version in a compiled .NET assembly

Simple question... is there a way to change the Assembly Version of a compiled .NET assembly? I'd actually be fine with a way to change the Assembly File Version. ...

Should I use OODB for small applications?

We looking to build an application to maintain meeting minutes and similar stuff using .net. I was thinking of using db4o or some OODB for this. Is it a bad idea? I am looking to simply create a repository of meeting minutes where users can perform lookups by date and little things like that. Is having a SQL Express DB a better option th...

How to mix colors "naturally" with C#?

I have to mix some colors in a natural way. This means blue + yellow = green blue + red = purple and so on. I got the colors as RGB-Values. When I try to mix them I got the right "RGB"-results like green + red = yellow yellow + blue = white but not the right "natural-wet-paint"-results. Any good idea how to mix RGB in a natural wa...

Creating ADO.NET mapping for custom type

I have a custom type that I created, which should be persisted in a database (in this case, SQL server) as a guid (though this question is just as valid for an object that could be stored as a string, integer, etc). When I pass this type as a parameter to a DbCommand object, I get an exception: ArgumentException: No mapping exists ...

Get last 10 lines of very large text file > 10GB c#

What is the most efficient way to display the last 10 lines of a very large text file (this particular file is over 10GB). I was thinking of just writing a simple c# app but I'm not sure how to do this effectively. Thanks! ...

Convert bitmaps to one multipage TIFF image in .NET 2.0

How can i convert an array of bitmaps into a brand new image of TIFF format, adding all the bitmaps as frames in this new tiff image? using .NET 2.0. ...

winforms control size limit

I am using a Panel's paint event to display a really long diagram. I've run into the problem of .net controls size (height and width) are silently limited to a signed 16 bit integer (32,767). I'm assuming this is an underlying win32 limitation. Is there a way to get around this limitation and have larger controls? ...

Dotnetnuke Version Determination

I've been tasked with fixing a dotnetnuke installation that was simply copied from one server to another and the first thing I need to do is figure out which version it is. What's the easiest way? ...

Casting SqlDataReaders

What are the advantages of replacing (int)reader[0] with reader.GetInt32(0)? I'm sure such casting functions are there for a reason, but other than it feeling more aesthetically pleasing to avoid the cast myself, I'm not sure what those reasons are. ...

filtering autocomplete options in windows mobile app

i'm working on windows mobile app (c#, .net 2.0). i would like to make use of the device's autocomplete features for a specific textbox, but i want to be more specific than the device provides by default. for example, i want to autocomplete to suggest a word of a specific length. it would also be nice to have several options given at on...

Why would you use a ".pfx" file in .NET

What is the ".pfx" extension used for in .NET? Why does it ask for a password when the solution is being built? ...

Linq to SQL Class

Hi, I have a Class see below, when i am trying to query it from another page it not linking e.g. if i put "var Notes = HandhedNotes.GetNotesByLinkIDJoin();" when i look at Notes theres not links there. I think its due to the IQuerable maybe I should be using something elese?? namespace WebSys { public partial class HandheldNote { ...

System.Text.Encoding.GetEncoding("iso-8859-1") throws PlatformNotSupportedException?

Hi See subject, note that this question only applies to the .NET compact framework. This happens on the emulators that ship with Windows Mobile 6 Professional SDK as well as on my English HTC Touch Pro (all .NET CF 3.5). iso-8859-1 stands for Western European (ISO), which is probably the most important encoding besides us-ascii (at leas...