.net

Do I also need to upgrade to TFS 2010 RC?

I'm currently using the beta2 versions VS2010 Ultimate and TFS. I want to upgrade to the VS to the RC release, and I dont mind that, not much trouble. However, Do I need to install the TFS again for it to work? Because that would probably wouldn't be as smooth as just VS... ...

What software or service can I use to programatically make phone calls with?

I'm looking to programatically make phone call reminders to customers based upon their opt-in requests. I am NOT a telemarketer. I need to make a phone call, and play a message. I need to leave a message after the beep if an answering machine or voicemail is detected. I need to know if the message was successfully delivered. Ideally, I...

Features of Visual Studio 2005 that is not in Visual Studio 2008

Currently I have both Visual Studio 2005 and 2008 on my machine. If I uninstall Visual Studio 2005, would I be missing something? If there is, what are they? Let's assume that I did a complete (not default) installation for both releases. Thanks in advance for your time and expertise. ...

Using MPXJ in .NET

I'm trying to work with MS Project files in an ASP.NET application, and came across the MPXJ library, which started out in Java and has been converted to a .NET version as well. It works fine in .NET, but the difficulty I'm finding with it is that all its methods use Java data types and not native .NET ones. This means that for things li...

How to catch SqlException caused by deadlock?

From a .NET 3.5 / C# app, I would like to catch SqlException but only if it is caused by deadlocks on a SQL Server 2008 instance. Typical error message is Transaction (Process ID 58) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. Yet, it does not seem to be a do...

Complex object validation with enterprise library validation block

Am using the enterprise library validation. I have classes like below public class Customer { public int Id { get; set; } [NotNullValidator(MessageTemplate = "{1} is null")] public string FirstName { get; set; } [NotNullValidator(MessageTemplate = "{1} is null")] public string Surname { g...

Render HtmlGenericControl from a HttpHandler

Hi, I have a set of code (noted below) in ProcessRequest(HttpContext context) in a generic handler .ashx file. HtmlGenericControl holder = new HtmlGenericControl("div"); //Set holder's properties and customization HtmlGenericControl button1 = new HtmlGenericControl("input"); //Set button1's properties and customization holder.Controls....

Readonly fields in WCF

I have a class like below [DataContract] public class Order { [DataMember] int orderId [DataMember] string ProductCode [DataMember] Double Quantity [DataMember] Decimal AmountToPay } Is it possible to have AmountToPay field as readOnly(as it will be calculated backend) so that clients wont be able to set it? ...

Pausing a Storyboard in WPF ?

I'm gonna pause a Storyboard in WPF, so I've used below code : Storyboard TheStoryboard; //Constructor public window { TheStoryboard = (Storyboard)this.FindResource("TheStoryboardName"); } private void MenuItemPause_Click(object sender, RoutedEventArgs e) { TheStoryboard.Pause(); } But nothing happen! What is the right way ...

what are the Generations in Garbage Collection?

I have not understood the generations of Garbage Collection though I found some from google. Can some one of you please tell me in simple terms about that. Or can reference to a link which will be easy to understand from ! Thanks in advance ...

How to identify if .net framework is installed in a system and it version using command prompt

Possible Duplicate: Is there a way to determine the .NET Framework version from the command line? How to identify if .net framework is installed in a system and it version using command prompt? Thanks in advance. ...

Does the BackgroundWorker provide real multithreading?

Learning to build multithreading WPF applications I read about some restrictions in using BackgroundWorker that was not very clear for me. Please, help me to understand: If I want not only one thread working behind the scene of UI, but maybe several ones, starting and ending independently one from another, will the BackgroundWorker fit...

Why is this linq extension method hit the database twice?

Hi folks, I have an extension method called ToListIfNotNullOrEmpty(), which is hitting the DB twice, instead of once. The first time it returns one result, the second time it returns all the correct results. I'm pretty sure the first time it hits the database, is when the .Any() method is getting called. here's the code. public stati...

Using System.Drawing, how can I draw something that imitates the effect of a yellow highlighting marker?

I want what's "behind" the yellow to show through. EDIT 1: But, if I'm drawing on "white", I'd like the marker color to retain its pure yellowness. EDIT 2: @Kevin's answer is probably correct, and I marked it correct, even though I didn't code it up. In my code, I'm settling for @Guffa's answer, using Color.FromArgb. ...

WebService Member Variables and Thread Safety

I fear this is obvious, but would someone mind confirming that the private fields of WebServices are thread safe? Specifically, 1) In the code below, each thread will get a new instance of the ReportService class protected void Page_Load(object sender, EventArgs e) { // Client side scripting ScriptManager scriptManager = Scrip...

TwainDotNet Scanning using TWAIN with BackgroundWorker

Has anyone tried TwainDotNet for scanning with TWAIN API calls from .NET? Though it works well usually I've some issues with it when used along with WPF application using MVVM. Basically I'm calling Twain scanning functions from a Service, which in turn uses a BackgroundWorker. List<BitmapSource> bitmapSources = new List<BitmapSource>()...

XML Deserialization

Hello Guys, I have tried to use the xsd.exe tool to generate a class for the following Oracle-generated xml sample but always fail to get it right when I try to change oracle xml elements names to the class's names, specifically I'm not sure how to do it for the ROWSET and ROW part of it. Being very new to the serialization/deseria...

Nested Enum and Property Naming Conflicts

There are some related questions here and here, but they didn't really give me satisfactory answers. The problem is that enums nested in a class in C# cannot have the same name as a property of the class. My example: public class Card { public enum Suit { Clubs, Diamonds, Spades, Hearts } ...

Modifying an item in a WPF sorted ListView doesn't change the sort position of that item.

I have a sortable listview that gets filled with a live data as it comes. Sorting works perfectly but the real problem arises when an item is modified after being added to the collection. The position of modified item does not change no matter what the sort orders is. I have googled it but couldn't find a better solution to make my list...

I can't find my custom TextBox control in Visual Studio

Hi, I'm creating a custom WinForms TextBox control, like this: class MyTest : TextBox { protected override void OnEnter(EventArgs e) { this.BackColor = Color.Yellow; } protected override void OnLeave(EventArgs e) { this.BackColor = Color.White; } } When I build the project, I cannot see the con...