.net

What is the performance impact of capturing objects in an anonymous method?

In a multi-threaded application, what is the performance impact of writing something like this: TestClass t = new TestClass(); ThreadPool.QueueUserWorkItem(x=>DoSomething(t)); Is there any difference if i write it like this: TestClass t = new TestClass(); ThreadPool.QueueUserWorkItem(x=>{ TestClass ...

Library for FLV/F4V conversation in C# .NET?

Is there any library that can covert input video (of some specific video files) to f4v or flv programatically in c# .NET? Thanks in advance. ...

Performing application reliability using iis 6/7

I have web-services applications, running on Windows Server 2003. These hosts (each of them on separate appPool) contains multiple operations (consulting services). Does exist an approach to perform reliability on these hosts, in terms of appPools (like customizing the pools): If an worker process fails, another will be started in its pl...

is there a pure C# ZeroConf , bonjour, or dns-sd available?

I'm building a .net-microframework app that uses Zeroconf. The existing zeroconf solutions all seem to either rely on dns-sd.dll or some other interop function of .net which is not supported in .netmf. Is there a pure C# version of zeroconf (or dns-sd) out there that you know of? ...

Parsing large delimited files with dynamic number of columns

Hi, What would be the best approach to parse a delimited file when the columns are unknown before parsing the file? The file format is Rightmove v3 (.blm), the structure looks like this: #HEADER# Version : 3 EOF : '^' EOR : '~' #DEFINITION# AGENT_REF^ADDRESS_1^POSTCODE1^MEDIA_IMAGE_00~ // can be any number of columns #DATA# agent1^the...

WinForm's CheckBox CheckedChanged vs. CheckStateChanged

WinForm CheckBox control implements both CheckedChanged and CheckStateChanged events. As far as I can tell both fire when the checked status of the checkbox is changed. CheckedChanged precedes CheckStateChanged, but other than that I see no difference. Am I missing something? Should one be preferred over another? ...

Active Diagrams is there any application that can do that

Hello to everybody I have a rather unusual question but it would be great if there is an answer. I work in a company that uses a rather old custom application (Access 2003 but is from Access 97 at least) it is starting to show its age. So personally i think its about to transfer it to .NET with all the pros and cons. The problem is thi...

.NET 2d library for circuit diagrams

I want to draw and manipulate logic flow (as opposed to analog) circuit diagrams and I'm trying not to reinvent the wheel. Problems like positioning, line drawing, line crossing and connecting, path finding, rubberband lines, and drag & drop are also identical in flow charts, UML diagrams, or class diagrams so I started by viewing relat...

How to change date formate in mysql stored procedure insert statemant "22-12-2010" to "2010-12-22"

I send the registration date parameter to mysql database like "22-12-2010". But my sql date date type is in another formate how can i change the date formate like "2010-12-22" also i have to insert this into table. Give code in c#,asp.net code behind either sql query statement! Cheerss!!!!! **Thanks A.Ayy...

Can .NET Task instances go out of scope during run?

If I have the following block of code in a method (using .NET 4 and the Task Parallel Library): var task = new Task(() => DoSomethingLongRunning()); task.Start(); and the method returns, will that task go out of scope and be garbage collected, or will it run to completion? I haven't noticed any issues with GCing, but want to make sur...

Sorting XML file by attribute

Hi, I have a following XML code: <Group> <GElement code="x"> <Group> <GElement code="x"> <fname>a</fname> <lname>b</lname> </GElement> <GElement code ="f"> <fname>fa</fname> </GElement> </Group> </GElement> <GElem...

I need to do multiple file upload in my asp.net page also have to display progess bar with status of file..

I need to do multiple file upload in my asp.net page also have to display progess bar with status of file..It should display the all file progress status bar seperatly and total progess inseperate progess bar.up to the file finish the upoad cheers!!! thank a.ayyappan ...

WCF SVC file running under Which Identity?

I have configured a Virtual Directory on IIS 6.0 running under UserA. AppPool for the same is configured under Network Services. I have one WCF svc file running under it, My question is: Is it running on UserA Account Or Network Service? ...

Pass Session data to a Class Library without using a bunch of constructors?

Hi all, I've got my application here where literally every object has a lastUpdatedBy property. The information I put into here is the person's username, which is retrieved from the session("username") variable. How can I pass this data to my DAL in the class library? At first I was just passing in the value into each method, but thi...

Cassandra Batch_insert example in C#.net

Can any one please give me an example on how to work on Cassandra batch_insert in C# thrift client? If possible please let me know where am I going wrong in the following code. Dictionary<string, Dictionary<string, List<Mutation>>> dictionary = new Dictionary<string, Dictionary<string, List<Mutation>>>(); Dictionary<string, List<M...

.NET - execute a lambda on another computer

Hi ;) I've recently implemented an IronRuby web service application for a client, to replace an existing C# .NET DLL. What the client forgot to mention was that in the mean time they implemented a new version of the DLL, with a new API based on lambda expressions. And made sure all calls (thousands :( ) use the new syntax. So now I need...

.NET vs Mono differences in Development

I'm looking into Mono and .NET C#, we'll be needing to run the code on Linux Servers in the future when the project is developed. At this point I've been looking at ASP.NET MVC and Mono I run an ubuntu distro and want to do development for a web application, some of the other developers use windows and run other .NET items with Visual St...

Excluding a specific substring from a regex

I'm attempting to mangle a SQL query via regex. My goal is essentially grab what is between FROM and ORDER BY, if ORDER BY exists. So, for example for the query: SELECT * FROM TableA WHERE ColumnA=42 ORDER BY ColumnB it should capture TableA WHERE ColumnA=42, and it should also capture if the ORDER BY expression isn't there. The closes...

Creating Delegates With Lambda Expressions in F#

Why does... type IntDelegate = delegate of int -> unit type ListHelper = static member ApplyDelegate (l : int list) (d : IntDelegate) = l |> List.iter (fun x -> d.Invoke x) ListHelper.ApplyDelegate [1..10] (fun x -> printfn "%d" x) not compile, when: type IntDelegate = delegate of int -> unit type ListHelper = stat...

How do actually castings work at the CLR level?

When doing an upcast or downcast, what does really happen behind the scenes? I had the idea that when doing something as: string myString = "abc"; object myObject = myString; string myStringBack = (string)myObject; the cast in the last line would have as only purpose tell the compiler we are safe we are not doing anything wrong. So, I...