.net-3.0

When creating a new GUI, is WPF the preferred choice over Windows Forms?

Most restrictions and tricks with windows forms are common to most programmers. But since .NET 3.0 there is also WPF available, the Windows Presentation Foundation. It is said that you can make "sexy applications" more easy with it and with .NET 3.5 SP1 it got a good speed boost on execution. But on the other side a lot of things are wo...

What are the best resources for Windows Workflow Foundation (WF)?

I am looking for a few books, blogs or articles on WWF. I've read the books below; however, I need resources that cover the topic in more depth. I am especially interested in local services, persistence, tracking and viewing Workflows from a website. Any suggestions?? Pro WF: Windows Workflow in .NET 3.0 Essential Windows Workflow Foun...

What is the most efficient way to handle the lifecycle of an object with COM interop?

I have a Windows Workflow application that uses classes I've written for COM automation. I'm opening Word and Excel from my classes using COM. I'm currently implementing IDisposable in my COM helper and using Marshal.ReleaseComObject(). However, if my Workflow fails, the Dispose() method isn't being called and the Word or Excel handles ...

How to use .NET 3.0 with Visual Studio 2005?

My Google-fu is failing me on this question. I have a coworker who has Visual Studio 2005 on his machine. I have Visual Studio 2008. He wants to open a project I wrote in C# 3.0, and we've gotten that far, but VS2005 barfs on the 3.0 code, like var. He has the 3.0 and 3.5 frameworks installed, as well as the Visual Studio 2005 Extensio...

.NET 3.5 published in 11/07 .NET 3.0 in 11/06. Why are most people still using .NET 2.0?

People have been developing own solutions to the following problems: Consistent messaging frameworks for remote information exchange (webservices,rpc,...) SDK's for state managements for things such as Finite State Machines and Workflows Authentication Frameworks And much more. For over two years now, Microsoft offers .NET 3.0 whic...

Performance of System.IO.ReadAllxxx / WriteAllxxx methods

Is there any performance comparison of System.IO.File.ReadAllxxx / WriteAllxxx methods vs StreamReader / StremWriter classes available on web. What you think is the best way(from a performance perspective) to read/write text files in .net 3.0? When I checked the MSDN page of System.IO.File class, in the sample code MS is using StreamRea...

How can you make use of the add-in framework in .NET 3.0?

There are some updates with .NET 3.0 concerning how to create and use add-ins for your own applications. I read about some "pipeline" you have to create for the communication between add-in and host-application but couldn't find further information about it. How would you made an add-in functionality in an application with .NET 3.0/3.5?...

C# 3.0 Anonymous Types: Naming

I was wondering if there is some way to name or rename a property on an Anonymous type to include a space in the property name. For example: var resultSet = from customer in customerList select new { FirstName = customer.firstName; }; In this example I would like FirstName to be "First Name". The reason for this ...

What is new in Visual Studio 2008 vs 2005 or C# 3.0 vs C# 2.0?

I was browsing the Hidden Features of C# question and thought I would try out one of the features I was unfamiliar with. Unfortunately I use Visual Studio 2005 and the feature in question was introduced later. Is there a good list for new features in C# 3.0 (Visual Studio 2008) vs. C# 2.0 (Visual Studio 2005)? ...

C#: Downloading a URL with timeout

What's the best way to do it in .NET? I always forget what I need to Dispose() (or wrap with using). EDIT: after a long time using WebRequest, I found out about customizing WebClient. Much better. ...

WCF for the totally clueless

I've been hearing about WCF for a couple of years now, and I still don't get it. I understand that it's supposed to be a replacement for web services, remoting, MSMQ, and a few other things. The trouble is, every tutorial I find assumes that I've done one of those things, and it tends to follow the line of "Here are the differences; yo...

Cross framework performance hit

I have a .NET 3.5 WinForms project that uses several 3rd party controls and a couple of home-grown components that are compiled for the 1.1 framework. Is there a performance hit for using 1.1 components? ...

WCF Book Recommendation

Touched on in other questions, but not directly...which WCF book(s) would you recommend? ...

WCF: Why does passing in a remote endpoint fail?

WCF: Why does passing in a remote endpoint fail when passing the same endpoint via the configuration file works? This works: Using con As New OfferingTap.OfferingTapClient(New ServiceModel.InstanceContext(callback), "NetTcpBinding_IOfferingTap" This doesn't: Using con As New OfferingTap.OfferingTapClient(New ServiceModel.Ins...

WCF service is running at computername.mydomain.local/service.svc, why?

Hi, My WCF service running on IIS7 seems to resolve at: http://computername.mydomain.local/service.svc My web.config doesn't reference any url. What could be the cause? ...

How do I write an XML string to a file?

Hi everyone, I have a string and its value is: <ROOT> qwerty <SampleElement>adsf</SampleElement> <SampleElement2>The text of the sample element2</SampleElement2> </ROOT> How can I write this string to a file using C# 3.0? Thanks in advance. ...

How Do You Pass a Message From One Program To Another?

I have a .Net 3.0 application that needs to pass an integer to another program on the same machine. I was using a WCF service to do this, but ran into user rights issues when trying HOSTING the service on the local box. Any thoughts on how to accomplish this woudld be greatly appreciated. Thanks, Dave ...

WCF: How do I get the list of endpoints from ServiceHost?

I can add endpoints using ServiceHost.AddServiceEndpoint. How do I get that list of endpoints back out? ...

Convert a BindingList<T> to an array of T

What's the easiest way to convert a BindingList<T> to a T[] ? EDIT: I'm on 3.0 for this project, so no LINQ. ...

How to use System.IdentityModel in own client-server application

I've got a simple client-server application based on TcpClient/TcpListener and SslStream. Clients can authenticate themselves to the server using a X509Certificate or by sending a user name and password after the SslStream has been established. WCF makes use of the System.IdentityModel namespace for authentication purposes, but apparent...