.net

C# - code against a property using the property name as a string

What's the simplest way to code against a property in C# when I have the property name as a string? For example, I want to allow the user to order some search results by a property of their choice (using LINQ). They will choose the "order by" property in the UI - as a string value of course. Is there a way to use that string directly ...

Where do I find the schema for .NET v2.0.50727 (SP2) machine.config file on XP?

Where do I find the schema for .NET v2.0.50727 (SP2) machine.config file on XP? ...

Slider and Label/Textblock control interaction - WPF

I have a slider and a label control. The text is displayed in the label (few paragraphs). I need to show only 3 words at a time.Every 1 second, move to the next set of 3 words. The slider is used to select the number of words that can be seen at once. So a user can increase it to say 10 and now every 1 second, a set of 10 words need to...

Regular Expression - Repeating Groups

I'm trying to read a log file and extract some machine/setting information using regular expressions. Here is a sample from the log: ... COMPUTER INFO: Computer Name: TESTCMP02 Windows User Name: testUser99 Time Since Last Reboot: 405 Minutes Processor: (2 processors) Intel(R) X...

Best way to keep a pipe open after a remote close

Using this tutorial i came up with the code below. My client is ran frequently. Its activated via clicks and possibly can be launched twice at the same moment in certain circumstance. I am worried one client may close while another client opens which causes the pipe to be closed in that slim few milliseconds. Whats the best way to keep t...

In F#. Is it possible to overload constructor of an abstract type?

If yes could you give an example of a type with parameterless and "parameterfull" constructor. Is that something you would recommend using or does F# provide some alternative more functional way. If yes could you please give an example of it? ...

Handling the context in Entity-framework

I have a class that provide the CRUD operation for an entity.Im using the context as private member accessible for all methods in the class. public class CustomerService { private CeoPolandEntities context; public CustomerService() { context = new CeoPolandEntities(); } public bool IsCustomerValid(str...

Techniques for sharing a config between two apps?

My app is split up into a configuration tool which writes the configuration and a viewer which just reads and uses settings from the configuration. What techniques for storing the properties would would be recommended in this scenario? Would XML for the different categories be a good idea? The apps are developing in C#, on .NET 3.5 an...

how does linq2sql keep track of database objects?

Hi, When using Linq2sql everything automagically works. My experience is that going with the flow is not always the best solution and to understand how something internally works is better so you use the technique optimally. So, my question is about linq2sql. If I do a query and get some database objects, or I create a new one, someho...

What is ActiveX Hosting?

I need to get the Flash Player ActiveX on the .NET Compact Framework in Windows CE 5. This thread says I need to create an "ActiveX Host" for Net CF in order to accomplish this. How do I do this? Does it mean that I program a COM container component for my ActiveX? (Flash Player) ...

what is the easiest way to have multiple db connections when using linq

Optimally I would like linq to use X database connections instead of 1 to speed things up. The only way now is to open X connections, and create X databasecontexts, and associate them. It would be easier if somehow I could tell linq to use X connections. Is this possible? Or is there another way to speed up database queries? thanks e...

Configuring Team System Code Analysis via a FxCop rules file

Is there anyway to configure the code analysis rules in Visual Studio Team System to match those in an FxCop configuration file and keep them in sync automatically? Not all the developers on the team have TS so keeping the rules we are currently running in an FxCop file is required so everyone can run the same set, but it would nice for...

.NET WinForms application not releasing components?

Hello: I'm working with a .NET 2.0 WinForms application in C#. I noticed something that I thought to be strange during the tear down of my application. In the designer generated dispose method: protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dis...

How Do I Find all Form Items in a Specified Control in ASP .NET

I ma using ASP .NET with a ListView, at one point, I need to go through each ListViewDataItem and find all of the form items within it, then pull the values from said form items. here is a general idea of what i want to do: foreach (ListViewDataItem listItem in MyList.Items) { foreach (FormItem formItem in listItem){ //so...

XSLT transformations on very large files

We are using XSLT to generate reports of our data. The data is currently stored in Oracle as XML documents (not using the XML type, but normal CLOB). We select the right XML documents and create a single document: <DATABASE> <XMLDOCUMENT> ... </XMLDOCUMENT> <XMLDOCUMENT> ... </XMLDOCUMENT> ... </DATABASE> In some cases, the c...

Is there a good "free" graphical web.config editor?

Like: https://www.hunterstone.com/hsstore/ProductDetails.aspx?productID=101 but free :-) ...

Cross-platform C++ application with .NET GUI?

I have a few years of experience in cross-platform desktop development (Windows and MacOSX, not Linux (at least not for GUI apps)). Usually I create the GUI on MacOSX with Cocoa, and on Windows I use the old-fashioned Windows API. I have not used Qt because when I started it was still under the GPL license. I find the native experience ...

Must i abort this thread? Waiting for namedpipes. How do i do this properly?

I have another question about this same code and keeping the pipe open after the client closes it But here i have a problem gracefully terminating my app. My main code is below. There are 2 problems. 1) I am using Thread.Abort and 2) This application doesnt actually end. I can set a breakpoint and see abort is called and step to the end...

Tab control to handle child windows in an MDI form (VB.NET)

My application uses an MDI form, and there are instances where the end user will need multiple child windows open at a time. I need an easy way for the user to switch between windows, which made me think of using tabs kinda like Firefox, or like the tabs in the Visual Studio IDE up at the top where you can switch between open forms and ...

What was the name of the parallel implementation of Linq (not from Microsoft)

I remember seeing a link about it here where some people claimed it's 1000 times faster than the BCL Linq. Anyone used it here? Is it true? Also is Microsoft's PLinq gonna be along the same lines? Because it seemed to me like the above mentioned Linq was automatically parallel or something. And if that's the case, why isn't Microsoft ...