.net

How do I get an animated gif to work in WPF?

What control type should I use - Image, MediaElement, etc?? ...

c# winforms: determine first run of program

I need to present a wizard once, the first time my windows forms application is run after install. I could use a user setting like firstrun = false I suppose. But I also need handle the case where the program is uninstalled, then reinstalled. How will that user setting be reset? It's already present in the config file in ...\Users--user-...

Using svn and .NET Winforms - Building Install Files Deletes _svn Folders

Does anyone know how to build an install project without it deleting/overwriting the _svn folders? I have a VB .NET 2005 Winform Application and each time I do an Installer Build, it deletes/overwrites the _svn folder in the directories. How can I stop this from happening? Any and all help is appreciated! Thanks! JFV ...

WCF Service Custom Configuration

In an application that is hosting several WCF services, what would be the best way to add custom configuration information for each service? For example you may want to pass or set a company name or specify the connectionString a service or some other parameter. I'm guessing this might be possible by implementing IServiceBehavior. i....

CNG, CryptoServiceProvider and Managed implementations of HashAlgorithm

So I was wondering if there are any major differences between the various implementations of the hash algorithms, take the SHA series of algorithms for example. All of them have 3 implementations each, 1 in managed code and 2 wrappers around different native crypto APIs, but are there any major differences between using any of them? I ca...

Article on using Firebird.NET in a WinForms application

Hi all, Can anyone provide me with a link to good article about using Firebird.NET with a WinForms application? A simple google search did not yield good results - I am looking for a step-by-step guide which will help me to quickly a few things and am not sure the documentation is a good place to start. Thanks in advance. Anindya...

Design Time Attribute For CSS Class in ASP.net Custom Server Control

Hopefully some Custom Control Designers/Builders can help I'm attempting to build my first custom control that is essential a client detail collection form. There are to be a series of elements to this form that require various styles applied to them. Ideally I'd like the VS 2005/2008 properties interface to be able to apply the CSSClas...

Wanted: good overview of .NET technologies

I'm looking for a good overview of all the .NET Framework assemblies and their namespaces and how they (are supposed to) work together. The MSDN .NET Framework Reference has a seemingly complete list of all .NET Framework Class Libraries. Of course---being the MSDN after all---this list is at best rated "border line sufficient", descri...

Unable to save Entity Framework Inherited types.

I have implemented some table-per-type inheritance in my data model (basically have a "BaseEntity" type with all the base information for my items and a "Employer" type that inherits from the "BaseEntity" item). Everything appears to be set up correctly and when using the Entities (either via ADO.net Data Services or via Linq to Entitie...

Nullable GUID

In my database, in one of the table I have a GUID column with allow nulls. I have a method with a Guid? parameter that inserts a new data row in the table. However when I say myNewRow.myGuidColumn = myGuid I get the following error: "Cannot implicitly convert type 'System.Guid?' to 'System.Guid'." ...

Is there a .NET equalent to SQL Servers newsequentialid()

Hi We use Guid's for primary key, which you know is clustered by default. When inserting a new row into a table it is inserted at a random page in the table (because Guid's are random). This has a measurable performance impact because the DB will split data pages all the time (fragmentation). But the main reason I what a sequential Gui...

Enum and property naming conflicts

When using a class that has an enum property, one usually gets a naming conflict between the property name and the enum type. Example: enum Day{ Monday, Tuesday, ... } class MyDateClass { private Day day; public Day Day{ get{ return day; } } } Since only flags enums should have plural names, naming the enum "Days" is not the w...

Hosted .NET runtime and window focus, problem and inconsistencies

We have a Win32 application that hosts the .NET runtime and opens up .NET managed forms from the Win32 portion of the application. These windows are always opened as modal windows. On some machines, when these windows are closed, the Win32 window that lies behind does not get focus, but gets sent behind Word, Outlook, or whatever else ...

Should I use Ansi or Unicode charset with dllimport?

When you use DllImport to import a function you can specify a CharSet to use. I noticed that in C#, C++ and visual basic the .Net runtime defaults to using Ansi instead of Unicode for this. So for any system call that has an A and a W version the A version will be called by default. .Net uses unicode internally and if I'm not mistaken ne...

SVN Libraries for .NET?

Any GOOD libraries available to access SVN from .net application (using C#). The only 4 I found so far that I will be trying out is: SVN# SVN.NET SharpSVN NSvn I wan't to create a very simple SVN client! ...

How to deal with an Undocumented API/Framework under .NET?

For work I have to code with an external company's API to deal with their proprietary database solution. Unfortunately the documentation they provide is more of an example guide then proper API docs, so it is very light on nitty gritty details like error codes, method returns, and exceptions. So for instance, a class will have a .GetEr...

Caching delegate results

I have a C# method which accepts a Predicate<Foo> and returns a list of matching items... public static List<Foo> FindAll( Predicate<Foo> filter ) { ... } The filter will often be one of a common set... public static class FooPredicates { public static readonly Predicate<Foo> IsEligible = ( foo => ...) ... } ...but may ...

32-bit PNG loading in .NET

Howdy, I haven't written any code yet, but I've encountered a similar problem before. Hopefully things have changed since the last time I visited it. I'm trying to do my own image conversion for games into a special OpenGL image format. In order to perform the conversion correctly, I need all pixel data and more importantly, i need al...

Reading from file not fast enough, how would I speed it up?

This is the way I read file: public static string readFile(string path) { StringBuilder stringFromFile = new StringBuilder(); StreamReader SR; string S; SR = File.OpenText(path); S = SR.ReadLine(); while (S != null) { stringFromFile.Append(SR.ReadLine()); ...

What qualities should a developer/architect look for when evaluating message queues?

In the Java world, there are a few more choices for message queues, but in .Net, there are only a few. When evaluating which one to use, what are some characteristics one should look for? What are the fundamental concepts that make up a reliable message queueing system? ...