.net

C#: do you need to dispose of objects and set them to null?

C#: do you need to dispose of objects and set them to null, or will the garbage collector clean them up when they go out of scope? ...

Make C# source run as a script?

I am doing a little scripting and i find sometime more power would be nice. Like the ability to keep trying to delete a file with a 1sec delay AND have it portable. I spent some time today translating a bat script to bash. I know i can use php or python but i VERY MUCH PREFER static/compile time checking. Is there a way to run C# code a...

I would like to create subdomains Dynamically under my domain using asp.net ,C#?

I would like to create subdomains Dynamically under my domain using asp.net ,C#? I can not find good solution for this. What are the things i should do to complete this. Scenario: 1.user register with site 2.domain name should be: http://username.domain.com Thanks ...

TFS 2010 Invoke built-in activity from custom CodeActivity

Hi, I'm trying to invoke a built-in activity from my custom CodeActivity for the TFS2010 Build Process. I've got my own CodeActivity which generates a batch file and I want to invoke the InvokeProcess activity (built-in) to execute that generated file. Of course I could split it into two activities, but it would be nicer if I could p...

How to set Registry Based Launch Condition in c#.net Desktop application setup

Please tell me how can i add such a launch condition to my desktop application setup (.net) so that, Only install the software if the revision level is high than that shown in the registry file. Where installation occurs update the registry file. Please help me out.. i am using VS2005 (c#.net) ...

Latest C# and .Net books .

Hi ALl, Can you please name some of latest books to learn C#4.0 and .Net4.0 ? ...

any .net Framework Application at some Point Memory?Other Errors Out with no errors

I have a strange problem/bug when I have many I believe .net Applications Open at once. I may at one point have 3 Visual Studio 2005 Projects open (big or small doesn't really matter) 2 Visual Studio 2003 Projects open & sql2005 Management Studio. Or various combinations of either/or. Always when I've got quite a bit open. What hap...

what is serialization in .Net

what is serialization in .Net ...

How can open source projects obtain license for commercial software without spending a lot of money?

I just joined an open source project on codeplex. The project is based on the .NET compact framework. So the development tool is Visual Studio. Currently I am using some trial version of Visual Studio which is going to end and I wondered how can I obtain a valid license to work on the project without spending a lot of money. Please pay a...

Visual Studio 2010 .NET framework 3.5 unavailable

Hey people, I have installed VS 2010 Professional, and despite my tremendous urge to work on it since it is pleasing to the eye, it seems not to support .NET framework 3.5/3.0. Therefore, I have switched to VS 2008 rather relunctantly. Does anyone know, to add .NET framework 3.0/3.5 to the top right Combo Box within the make new pr...

How do I cache look up data in Linq to Sql, and use that data in a separate DataContext?

The project I'm working on has quite a lot of "look up" data associated with it. For this reason, on the first instantiation of the class that handles this, I set static IEnumerable's with all the lookup data, thusly: private static IEnumerable<Kiosk> _kiosks; private static IEnumerable<Paper> _papers; private static IEnumerable<NewsAge...

How can I have a Windsor IoC container that can be shared amongst my classes but not shared across multiple web requests?

I am building a set of class libraries that produce office open xml based reports and I am using a static Windsor IoC container. My problem is that one possible entry point to the reporting system is via a web front end which means that the reporting systems static IoC Container is being shared amongst multiple web requests which causes...

Tracing log for user doing transaction

Dear All, I want all of you help to create file log for tracing user transaction. I want to do that when a user wants to update or add some information, I want to trace which information that user was updated. The tracing file that I want is easy read and search. Even, it is in text file or xml file. Thanks, Sopolin ...

How to correctly stop thread which is using Control.Invoke

I tried the following (pseudocode) but I always get a deadlock when Iam trying to stop my thread. The problem is that Join() waits for the thread to complete and a pending Invoke() operation is also waiting to complete. How can I solve this? Thread workerThread = new Thread(BackupThreadRunner); volatile bool cancel; // this is the thre...

C# - Incrementing a double value (1.212E+25)

I have a double value that equals 1.212E+25 When I throw it out to text I do myVar.ToString("0000000000000000000000") The problem is even if I do myVar++ 3 or 4 times the value seems to stay the same. Why is that? ...

The best way to use dictionary items as we use the advantages of List

I want to get use of dictionary items like I do in List generic class, e.g; foreach(item in ItemList) { item.BlaBla; } But in dictionary there s no chance, like e method above... Dictionary<string, HtmlInputImage> smartPenImageDictionary; I mean I got to know the key item for the dictionary item.. but what I want, I want to trave...

How do I automatically delete an Excel file after creating it on a server and returning it to the user?

Hello, I am creating an Excel file on a web server, using OleDb to connect the the physical (well as physical as it can be) file and appending records. I am then returning a FilePathResult to the user via MVC, and would like to delete the physical file afterwards due to data protection concerns over the appended records. I have tried u...

Detecting type of webservice in httpmodule

Hi, Is there any way to detect the type of a webservice inside a httpmodule? The reason for this is that I want to do some property injection to the webservice before it's processed. I found this: http://social.msdn.microsoft.com/Forums/en/asmxandxml/thread/0e848eee-d353-4e67-b47f-89fddb600009 but that is one h..l of an ugly solution....

WinForm resizing matrix?

WinForms (.NET 2) question: Is there a way to keep elements at a proportional distance when the parent form(or panel) is resized? Could I use Graphics.TransformPoints or Graphics.TransformVectors for this scope? How. EDIT: TableLayoutPanel will not work because superposed elements should be accepted. EDIT2: This is my code: usi...

Use resource image in embedded web view in c#/vb.net

How to use resource image in embedded web view without copying to local file system in c# application? ...