.net

What should .NET programmer learn in Java/Flex world (equivalents to ASP.MVC2, MEF, Prism, IoC and DI frameworks

I'd like to play with Java/Flx and build RIA with Java as backend and Flex as frontend and if it would be necessary mayby some website (i don't know which framework right now, probably Spring + some Jquery) But at the begining i'd like to know which technologies should i use. Now i'm ASP.NET (MVC2) + WPF and a bit Silverlight programmer...

Why does Enumerable.ToLookup<>() return an ILookup<,> and not a Lookup<,>?

There is one method in Lookup<,> that is not in ILookup<,>: public IEnumerable<TResult> ApplyResultSelector<TResult>( Func<TKey, IEnumerable<TElement>, TResult> resultSelector); Why is the return type of Enumerable.ToLookup<>() declared to be ILookup<,> despite the fact that it always seems to return an instance of Lookup<,>? If t...

.NET collection type for storing recent list

Is there a specific collection type in .NET which allows storing a limited number objects and removing the oldest element automatically? What's the easiest way to implement such "Recent Files" functionality? ...

In LINQ, can I select multiple items?

Say I have an array of strings like this: string [] foos = { "abc", "def", "ghi" }; I want a new collection that contains each string and its reverse. So the result should be: "abc", "cba", "def", "fed", "ghi", "ihg" I could just iterate through the array, but this is pretty clumsy: string Rever...

Displaying real-time graphics (.net 2.0)

This puzzles me for years, since MFC. We all know DC limitations in Windows, and I really want to break free from it this time. What I need is to be able to draw at some hWnd, i.e. control, at any time - from any thread, even using direct bit manipulation! Is there anybody that can shed some light to it. I prefer that question should...

.net open source rateless erasure code

I'm looking for an open source .net (preferably C#) library which implements rateless erasure codes. Has anyone come across any good libraries? ...

HttpWebRequest in .NET - Logging into a webpage

Hi - Simple question ahead! STATUS: I've come this far I've implemented a solution where I get a cookie with a session, but it still doesn't work. In the sniffer tool, I can see the difference between my application and when using the real website as this: REAL: ASPSESSIONIDSCRAASDB=EFFBFPEAKOBJGLAPNABPLLCB; passes=15; ChatCannel=1 ...

Regasm fails if assembly depends on other assebmly not located in the same folder

Consider following scenario I have 2 assemblies Assembly named A.dll located in folder Fold_A Assembly named B.dll located in folder Fold_B A.dll depends on B.dll and A is COM visible when I'm performing comand regasm A.dll /codebase it fails , but when B copied into fold_a - the command succeeded The question is : Is there some wa...

LInq to XML question

Possible Duplicate: How to query an XDocument with LINQ when elements have a colon in their name? I tried using XDocument to read a xml file that contains elements like this <link:direct ...> running the code xml.Elements("link:direct") gives me an error saying that I cannot use ':' The ':' character, hexadecimal value ...

Propagate Application Service as WCF Service

Hello, I have description of my Application Services using my fancy classes (ServiceDescription class that contains collection of ServiceMethod description, for simplification). Now, I want to expose one Application Service as one WCF Service (one Contract). The current solution is very lame - I have console application that generates ...

.NET engineers at Google, Amazon.com, etc.

This isn't a programming question per se, but I wanted to know: 1) Whether programmers who primarily specialize and code in a .NET environment get hired at Google, Amazon.com or other companies/startups which are mainly Java/MySql shops, 2) And whether there are any .NET teams at Google, Amazon.com or other startups on the East/West co...

Is there a way to programmatically remove friends on Facebook?

It sure is a pain to prune a Facebook profile. Is there any way using the Facebook API (or some other mechanism) to authenticate as a particular user and remove friends from the user's list? I have looked through the API documentation, but I'm not familiar with the ins and outs of the platform. ...

Entity Framework Brainmush Kerfuffle Spectacular

I've been wading through all the new EF and WCF stuff in .NET 4 for a major project in its early stages, and I think my brain's now officially turned to sludge. It's the first large-scale development work I've done in .NET since the 1.1 days. As usual everything needs to be done yesterday, so I'm playing catch-up. This is what I need to...

What to do when neither TransactionScope nor nested transactions are supported?

TransactionScope is an amazing feature but too few providers do implement it correctly. I don't want to pass the connection as parameter. ...

C# implementation of Google's 'Encoded Polyline Algorithm'

Does anyone have a concise and robust implementation of Google's Encoded Polyline Algorithm in C#? I essentially want the implementation of this signature: public string Encode(IEnumerable<Point> points); ...

Entity Framework - how can I change connection string to be relative?

Hi, Can someone confirm how to change the auto-generated connection string for an entity framework application so that it is relative? That is so it will work for anyone who downloads and installs the application. That is, currently the connection string auto-generated for me has an absolute path in it. See below for an example: <a...

Multi level Xml Array produces xsi:nil="true" instead of Attribute Name in Soap Document

When I do like this [XmlType("c1")] [XmlRoot("c1")] public class Class1 { [XmlArray("items")] [XmlArrayItem("c2")] public Class2[] Items; } [XmlType("c2")] public class Class2 { [XmlAttribute("name")] public string Name; } I get this <soap:Body> <HelloWorld xmlns="http://tempuri.org/"&gt; <c1> ...

limit item highlight width to grid width

Hi Dear, I am using ListView with GridView as ListView.View. I want to limit the width of the highlight bar to the actual width of the grid, not stretch over the whole window. Should I using the ListView.ItemContainerStyle to customized? Can you tell me how? Thank you very much. Cheers ...

DataGrid - how to make Column sorting dynamic, to cater for when bound data changes?

I'm using a DataGrid in a VS2010 WPF C# project. I have bound the DataGrid to an ObservableCollection. When you click on a column heading it sorts the data at that point in time. Question - How would I arrange such that the sorting in the DataGrid is dynamic, so that when data changes (within the ObservableCollection) the sorting keep...

c#: form doesn't close

After I added the following code to my code-behind, my form doesn't get closed. Could you please help me out with this one? private void Form1_FormClosing(object sender, FormClosingEventArgs e) { MyThreadingObj.Dispose(); } ...