.net

How to extract some data from a collection using lambda/linq to objects?

Hi folks, i have an IList<Animals> farmAnimals; this list has three types, Cows Sheep Chickens how can i remove all the Chickens from the list using a lambda query or linq-to-objects so i have a separate list of chickens and the original list now only has cows and sheep. Do i have to make three lists (the original + 2 new ones, fi...

F# - Breaking a List into Concatenated Strings by an Interval

I have a list of email addresses, and I need to send an email notification to each address. I'd like to do this in blocks of 25 addresses at a time. Is there any quick way in a functional language like F# to "fold" (concatenate) 25 emails addresses together... each separated by a semicolon. I know there is the String.Split method in .NET...

How to be master in C# and object oriented technology ?

I'm newbie of C# developer. I have a little knowledge of C# and OOP. My goal in this year is "To be master in programming and object oriented technology" I have set my learning path as follow. (order by learning step) C# and OOP OOAD UML Requirement Management Design Pattern Is my learning path is good? If not please suggest me for b...

Detect change of resolution c# WinForms

Hello, is there an easy way to hook to an event that is triggered on change of global screen resolution? Thanks in advance Matze ...

WCF WSDL location address with HTTPS

A common issue for WCF appears to be how the hostname is resolved within the wsdl for the links to other files. The issue is that the machine name of the computer is placed into the wsdl to link the other wsdl files, so if you visit http://myhost/service.svc it may point to the rest of the wsdl on another location, ie http://mypc/service...

L2SQL or EF?

Hi guys I am wondering what's your opinion about this. I have used L2SQL in my last project, and its a great OR mapping system. I have never used EF yet, however I have read that the Microsoft team seem to give it more importance than the L2SQL. What's your opinion? (edit: multiple duplicates - see comments, most notably: Entity Fra...

C#: bandwidth

Is there any way i can calculate bandwidth (packets sent and received) by an exe/application via net? have loooked into IPGlobalProperties, and other classes .... i want packets sent n received by a single application.. i have checked http://netstatagent.com/ I need something similar... is there anything in .net which can help me? My a...

Problem with CLRProfiler

I am trying to use Microsoft's CLRProfiler to profile my fairly large app, and it is crashing whenever it tries to write (or read) a log file. Ironically, the exact bug is documented on the MS 'Feedback' site as being not reproducible, and seems never to have been fixed. I am getting a NullReferenceException at: CLRProfiler.ReadNewLog.R...

Translation repository when localizing WinForms

When I am writing translated strings into the form resx files in VS2008, is there anything like a translation repository? It was very helpful in my old C++ Builder times: Translate "Cancel" in one form to German "Abbrechnen" Add this translation to a repository, since this word is repeated in most forms When I start to translate anothe...

Is there a market amongst programmers for an OID-keyed blob store?

A friend has developed a very amazing blob store and I think it needs to be used, but I'm wondering whether people think such a thing has a market, and if programmers ever get to make these kinds of decisions. It has support for online backups using deltas and is much faster than anything I know of, it's undergone rigorous testing and b...

How/Where to host an UDP based component?

Hi, I´m working on a project that basically will show some data collected from hardware devices through UDP protocol. the first idea of how to do this: implement a winService (to listen and persist the messages) and a wepApp to manage the data, based on .NET platform. I´m confused about if exists the possibility to rent a "windows servi...

From XML to object

I would like to define an asp.net page from xml, then parse/render it by calling a command name. Just like they do in Flex. Does someone has an idea how to do that? Like for example, from XML: <button onClick="DoJavascript()" text="Submit"/> <gridview ......./> To parse: <asp:button runat="server" onClick="DoJavascript()" text="Subm...

How do I access information about a cascading dynamic prompt via Crystal Report API?

I am using the CR 2008 RAS API (but could also use an older API if needed). Any idea how to access information about the settings for dynamic prompts in a report? I can access the PromptField objects with dataDefController.ParameterFieldController. GetPromptParameterFields(new PropertyBagClass()); but can't seem t...

Are there (free) tools or libraries for 3D WPF objects?

I wanted to play around with some 3D controls in WPF, but was mildly surprised to find that there were no primitive solid controls in WPF - I just wanted to plop a few spheres and cubes in a scene, but didn't realize I had to render them using meshes. Surely someone has created libraries of 3d primitives that can be added to WPF 3D scen...

.NET 3.5 - Configuration system failed to initialize exception

In my winform app, I am trying to add a userSetting, although the error is occuring with appSettings too. When the setting is added I get an exeption thrown that says: "Configuration system failed to initialize" with a Inner Exception "Unrecognized configuration section userSetting" Exception Details: System.Configuration.Configuration...

Webservice help

How would I refactor this to get it to return a string not a dataset? [WebMethod] public DataSet GetPONumber(string Database) { SqlConnection sqlConn = new SqlConnection(); sqlConn.ConnectionString = GetConnString(Database); // build query string strSQL = @" A SELECT QUERY!!!!!...

What could cause a VB.NET application to crash before running any code?

My VB.NET application compiles, installs and works fine on the development PC. However, when I take the install package elsewhere, it installs ok but crashes before any code is executed. The error is " has encountered a problem and needs to close..." I have removed all references to external files e.g. icon files etc. I have only one...

Lambda variable names - to short name, or not to short name?

Typically, when I use lambdas, I just use "a, b, c, d..." as variable names as the types are easily inferred, and I find short names to be easier to read. Here is an example: var someEnumerable = GetSomeEnumerable(); var somethingElseList = someEnumerable.Select(a => a.SomeProperty) .OrderBy(a => a...

Changing default font in Windows messes up my Win Forms buttons.

We have a collection of C# (.NET 2.0) applications that have custom dialog windows. When the user changes the default font size and resolution etc in Windows the edges of the form lose controls (they get pushed off the visible portion of the form) typically dropping off buttons from the bottom. This is problematic for us and will cause i...

Is this part of MVC in .NET?

I have a .NET MVC winform app. I've created an AppDelegate class that handles application startup and shutdown...for now (it might do more later). Winform apps have a Program.cs file that does some app initialization, starts the message pump and creates the first form. In my app, the first form is AppDelegate, which isn't really a fo...