.net

.net alternatives for available java programs

I have seen some question asking java alternative for something which is available in .net Example : http://stackoverflow.com/questions/762499/java-alternative-to-windows-workflow-foundation I am interested to know if there is anything else that is available in java and we have to look for an alternative in .net. I am a MS based techn...

What minimum version of .NET can I expect on client machines?

I know that in general I can expect .NET 2.0 or better installed on most client/customer machines since it's been included in Windows XP SP1 (SP2?) for some time and comes standard in Vista/2003/2008. But my question now is, can I expect .NET 3.0 to support WCF/WPF? We build component libraries so we can't make too many assumptions and r...

Would you avoid using a component that requires .NET 3.5?

In a follow up to a previous question, would you avoid using a component library that required .NET 3.0/3.5? Would the additional install requirements be too much to ask or, is the .NET installer easy enough to just include or link to that it doesn't matter? ...

DataGridView item double click

I have a DataGridView in a Windows Form. I want to handle double click events on each cell to display a detail form related to that record. Unfortunately, the double click event is executed when you double click on column headers. What should I do? ...

Location of Third Party Dll's in Version Control for .NET Project

What would be the ideal location (directory) to check in Third Party Reference Dll's for a .NET Project in a version control system. Typically i have seen most people to put them under bin, so that the runtime can automatically pickup these files. However is that the right way to go. I originally wanted to have a separate directory whic...

.NET Reflection on unloadable types

I have a library which contains unloadable type (whenever I try to access them I get a TypeLoadException). Therefore, I can't use the System.Reflection namespace to inspect those types. Is there some other way to reflect on those types. Of course, I don't expect to be able to use any methods, I just want to see basic info such as method ...

How to deal with ThreadPool and member variables?

Hello everyone, I am a bit new to ThreadPool in .NET. I was wondering, if I can only send one object to my callback method, how am I able to access the class member variable to call its methods? (see customClass in CallBack()) And how would I load the data from customClass? Do I pass the customClass to a different CallBack method? i...

Performance of passing lots of value types in parameters

I am currently reading C# in Depth by Jon Skeet and have been reading about value and reference types. It got me thinking about the cost of using value types as method parameters due to that value being copied when passed. While this cost is not much when considering integers, what if those value parameters were strings which got passed...

What is the difference between = and :=

I'm sure this is straightforward but I cannot find the correct string to get a google result. In VB.NET what is the difference between = (equals sign) and := (colon followed by equals sign)? ...

In C#, are there any built-in exceptions I shouldn't use?

I was just wondering - are there any Exceptions defined in the .NET Framework that I shouldn't throw in my own code, or that it is bad practice to? Should I write my own? ...

Detect if an assembly is in the GAC via WiX 3?

I'd like to detect in WiX 3 (preferably via a Condition) whether a particular assembly is in the GAC. I know the name, version, and public key token of said assembly. Is there any built in way to do this, or will I have to write a CustomAction to do it? And how would I go about setting up that CustomAction? (This would be before the inst...

How to share objects across processes in .Net?

I'm trying to "share" .net objects across separate processes. I have one type of process that's a web service that manipulates a set of domain entities. Another type of process is a window service that's doing some automatic batch processing on the same set of objects. Beyond the typical solution of having the DB as the shared space whe...

Calculate System.Decimal Precision and Scale

Suppose that we have a System.Decimal number. For illustration, let's take one whose ToString() representation is as follows: d.ToString() = "123.4500" The following can be said about this Decimal. For our purposes here, scale is defined as the number of digits to the right of the decimal point. Effective scale is similar but ignores...

Problem with multiple reference to a class library

Hello to all, I'll try to explain the problem as best as I can since it is a bit strange for me. I have a C# class library that defines a bunch of classes that will used as Data Transfer Objects or DTOs. There's a Windows Forms application that has a reference to this DTOs class library and also a reference to another class library wh...

Best tutorial for the classes in System.Collections.Generic and System.Collections.Specialized namespaces?

I am looking for a book or article that goes into great level of detail on the generic Collections in .NET comparing performance and providing good advice on when to use the different collections. I am interested both in theoretical and real-life information. To be more concrete, have you seen any benchmarks comparing different collecti...

Amount of Connections per server? C#, web

I am connecting to a 3rd party server. I know right now they allow 8 connections from the same remote user. However i dont know if they will raise or lower the connection limit. So i want my app to dynamically find out. How can i do this? I'm using C#, MSVS 2008 I started a bounty for anyone who can give me working C#. If no one does t...

Can i make a DLL file auto run and keep working?

I just saw in some wordpress plugins, there are auto tag plugin, auto RSS fetch, just you install the plugin and it keep working for ever without calling it. What i want to do is to put a dll file inside my Images folder and it will monitor the uploaded files and edit them based on some options, i want this dll to work automatically just...

Implementing search on an ASP.NET MVC website

I've created a content-managed website using ASP.NET MVC. All content is stored in the 'Content' table in a SQL Server database, with the text itself stored in a column of datatype 'XML'. I want to add a search feature to the site that will search all the XML content and return a list of results, each of which links to the content item....

Code Randomization

I am trying to build a ReTrust system which requires that DLL files be transferred from one system to another. Thus to just add a bit of complexity, I would like to Randomize the code - i.e change the code in a way that every time I have to send a DLL, it will be different then the one sent previously. Please suggest some measures. (Note...

Get perforce data into a .NET application

Hi all. I'm curious as if anyone has used any method of getting data from perforce into a managed language. I've found a few sample applications out there, and I'm hoping someone here has had success in doing this and could offer some advice. Thanks! ...