.net

List of installed programs/updates that can be uninstalled

I know that all installed programs and updates can be found at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall key in the registry. But how can I differentiate between installed programs and installed updates? ...

Nested UpdatePanel Triggers

My child UpdatePanel updates both its contents and those of its parent UpdatePanel. <asp:UpdatePanel ID="UpdatePanel1" runat="server"> ... <asp:UpdatePanel ID="UpdatePanel2" runat="server"> ... </asp:UpdatePanel> ... </asp:UpdatePanel> I don't want my parent UpdatePanel t...

How to use Binary Serializing to store as a string?

Basically I want MyObject to be serialized into a string using Binary Serialization. Is this possible? If so, how to do this? Same for deserialization, from string to MyObject. ...

Refactoring Func<T> into Expression<Func<T>>

I have a method that currently takes a Func<Product, string> as a parameter, but I need it to be an Expression<Func<Product, string>>. Using AdventureWorks, here's an example of what I'd like to do using the Func. private static void DoSomethingWithFunc(Func<Product, string> myFunc) { using (AdventureWorksDataContext db = new Adven...

What is the AppDomainSetup.SandboxInterop Property for?

I am using reading the documentation for app domains in .net 3.5 and came across SandboxInterop. The docs says Gets or sets a value that indicates whether interface caching is disabled for interop calls in the application domain, so that a QueryInterface is performed on each call. But why would I ever wish to disable the caching of Qu...

How to generate "VSTemplate" file from a WebSite/Project (Visual Studio/.NET)

Hey, Is there any API or command-line able to generate a VSTemplate file from a WebSite/Project that is NOT by using Projectgen.exe? Thanks. ...

Good introduction to the .NET Reactive Framework

Aside from the Microsoft documentation, does anyone know of a good introduction and tutorial to the Microsoft Reactive (Rx) framework? Also, could someone articulate a good example (with code) of a programming problem that is challenging to solve using conventional asynchronous coding techniques that Reactive makes easier. ...

Parse integer from string containing letters and spaces - C#

What is the most efficient way to parse an integer out of a string that contains letters and spaces? Example: I am passed the following string: "RC 272". I want to retrieve 272 from the string. I am using C# and .NET 2.0 framework. ...

Co-Worker pushing for a scary and smelly software solution, need help!

A coder w/ a lot of clout in my office wants to go down a path I feel is instinctively wrong. We need a business rules framework for a set of web services we have for accepting certain types of xml infosets in a WCF based POX service. In the previous version we used a homebrewed rules framework that would trigger off certain data points...

Why doesn't .NET have a bidirectional enumerator?

It's been asked a couple of times on SO how you can implement a bidirectional enumerator (http://stackoverflow.com/questions/191788/two-directional-list-enumerator-in-net, http://stackoverflow.com/questions/451099/implementing-a-bidirectional-enumerator-in-c). My question is not how (which is trivial for most cases), but why no such type...

Why does Binary Serialization require the object to be marked as serializable?

I was using the xml serializer but when I switched to binary serialization, it throws an exception: -- Runtime error: dotNet runtime exception: Type 'MyTypes.MyObject' in Assembly 'MyTypes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable. Why is it different than an xml serializer in the way it ask...

Is there an API for accessing my Windows Live calendar data?

Google calendar has an API. Does Windows Live provide something similar? Here is a link to the Google API: http://code.google.com/apis/calendar/data/2.0/developers_guide.html I am looking for an equivalent from Microsoft. ...

Use JQuery to scroll ListBox (select box) to certain item

I have a list box control that contains enough items to list them with a scroll bar. I'd like the user to be able to enter a few letters and have the ASP ListBox scroll to the first option whose text starts with those letters. I'm hoping that JQuery offers some simple functionality or plug-in that works with the element, but so far,...

Best Type to set as return type for methods that return a collection?

Which is the best type to us for returning collections? Should I use IList<T>, IEnumerable<T>, IQueryable<T>, something else? Which is best and why? I'm trying to decide which I should use typically, both in the interface and the implementation of a few classes that I'm writing. edit Let me nail this down a little further, I am using ...

Reading RSS feeds --> not consistent

Hi There, i am trying to read the RSS feed by loading it to xmldocument some thing like xmlTextReader = new XmlTextReader(url); XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(xmlTextReader); some times the loading to xml document succeeds and some times it fails . the url i am using is http://rss.nzherald.co.nz/rss/xml/nzh...

Implementing multiple screens in an Application

Weird question, but one that puzzles me a bit. In the old days when we had Terminals and DOS, applications generally only had one "window", and that was a fullscreen one. When people switched functions, there was no concept of opening a new window, but instead the content of the main window was overwritten. So there was only one main win...

Any "gotchas" with remotely-coded, locally-run .NET web apps on XP machines?

It looks like I am going to be on a project where, for deadline and expertise reasons, we are going to code a web app (.NET 3.5) that will be deployed to enterprise laptops to be run locally. Since my experience with developing web apps has only been with centralized servers that I can immediately jump on and take control of, I'm trying ...

IBatis.Net on VS 2008 first run

Examples can't be compiled. Tryed to remove NUnit references but got the error: [ConfigurationException: - The error occurred while loading SqlMap. - The error occurred in <sqlMap resource=... Tryed to create a very simple test but got the same error. It doesn't say what is the issue in my SqlMap. Couldn't find an example that reall...

How do I Connect to a Sybase Database from Windows CE using .Net?

I need to make a connection to a Sybase (SQL Anywhere) database in a Windows CE app over the network (wifi). I'm hoping someone in the SO community has done before and can't point me in the right direction. There doesn't seem to be a lot of information on the topic. I've tried google, SO and the sybase website. Thanks in advance ...

Free video (screencast , webcasts ...) training on DDD

Are there any free video training resources for Domain Driven Design ? ...