.net

Does anyone know of a spell check library that underlines text?

Does anyone know of a C# spell check library that would underline misspelled works in a windows form text box? In the past, I've used NetSpell and works great if users use the dialog box. I'm thinking I might be able to automatically call the spell check while text is being updated and underline the text. Anyone have any good ideas on...

WPF Applications Size Vs Winforms App Size

Does WPF compiled code is bigger or smaller than Winform compiled code? Does WPF generates more code behind that Winform does? I have a Winform App and I want to make a new version on WPF. Customers get the updates of this app by dowloading it. So my question is, If I make the application now on WPF just using the same screens how bigger...

Does DataAdapter.Fill() close its connection when an Exception is thrown?

Hi, I am using ADO.NET (.NET 1.1) in a legacy app. I know that DataAdapter.Fill() opens and closes connections if the connection hasn't been opened manually before it's given to the DataAdapter. My question: Does it also close the connection if the .Fill() causes an Exception? (due to SQL Server cannot be reached, or whatever). Does it ...

Delphi SOAP Envelope and WCF

Hi all, I am working on a system that provides a soap interface. One of the systems that are going to use the interface is coded in Delphi 7. The web service is developed with WCF, basic http binding, SOAP 1.1. If I use SOAP UI (JAVA), the service works properly. But Delphi seems to do special things here ;) This is how the message lo...

How do I sort an array of custom classes?

I have a class with 2 strings and 1 double (amount). class Donator string name string comment double amount Now I have a Array of Donators filled. How I can sort by Amount? ...

Is there an equivalent to the ErrorProvider for Silverlight

Hello fellow SOers, I was wondering if there was a control similar to the ErrorProvider (in windows forms) available in Silverlight. I just have a very nice use for it and it would be very handy if there was one available. If not, is there a next best option that you experienced silverlighters are using. Regards Lloyd ...

Possible to view T-SQL syntax of a stored proc-based SqlCommand?

Hello! I was wondering if anybody knows of a way to retrieve the actual T-SQL that is to be executed by a SqlCommand object (with a CommandType of StoredProcedure) before it executes... My scenario involves optionally saving DB operations to a file or MSMQ before the command is actually executed. My assumption is that if you create a Sq...

Why can't I inspect local variables with IntelliTrace for VS 2010?

When navigating to previous calls/events during debugging with IntelliTrace, I can't see a snapshot of the value of locally-defined variables. When hovering with the mouse I get the message "Intellitrace data has not been collected". Does anyone know why? ...

WCF - separating service contracts and partial deriving?

So, I've seperated my WCF service contracts into discrete contracts for re-use. I use to have IOneServiceContract that contained 3 functions: Function1, Function2, Function3. I've seperated this service contract into two discrete service contracts: IServiceContract1 and IServiceContract2. IServiceContract1 contains Function1 and I...

Tips for optimizing C#/.NET programs

It seems like optimization is a lost art these days. Wasn't there a time when all programmers squeezed every ounce of efficiency from their code? Often doing so while walking 5 miles in the snow? In the spirit of bringing back a lost art, what are some tips that you know of for simple (or perhaps complex) changes to optimize C#/.NET cod...

When getting substring in .Net, does the new string reference the same original string data or does the data get copied?

Assuming I have the following strings: string str1 = "Hello World!"; string str2 = str1.SubString(6, 5); // "World" I am hoping that in the above example str2 does not copy "World", but simply ends up being a new string that points to the same memory space only that it starts with an offset of 6 and a length of 5. In actuality I am...

A good way in .NET Winforms to have user entered time frame?

Hi, Does anyone know of a good way to have a user enter an amount of time (hours and minutes) using winforms controls? At the moment I have two numeric up downs, one for time and one for minutes that I then parse to create a timespan. The only other idea I have is a text box that a user can enter a "00:00" time in, and validate the inp...

VS 2003: console application .net remoting

Does any one know how to connect my c# console application to .net remoting server object. How to make changes to config file for console application to consume the .net remoting object? ...

Dynamic List<T> type

Hi all, Is it possible to create a new List<T> where the T is dynamically set at runtime? Cheers ...

Is it possible to use the .NET version of TeeChart with C++?

TeeChart .NET is a 100% managed C#.NET Charting Control. Would it still be possible to use the .NET version of the charting control with Visual C++? I'm contemplating changing IDEs from Codegear to Visual Studio, so the legacy C++ code is obviously not C++/CLI ...

How do I design a .NET (C#) for a program that needs to run as a Windows service but also have a web interface?

I am designing a piece of software that needs to operate different pieces of hardware based mainly on a schedule but it also needs to have a web interface for configuring settings, configuring the schedule, and possibly even manually controlling the hardware. I'm not sure how to design the architecture of software like this. One though...

.NET System.Timer Question - Event triggered when Timer.Start() is called?

When a timer's autostart is set to true, does it execute the elapsed event automatically, or just wait for the elapsed interval then executes the event? ...

Please Explain .NET Delegates

So I read MSDN and Stack Overflow. I understand what the Action Delegate does in general but it is not clicking no matter how many examples I do. In general, the same goes for the idea of delegates. So here is my question. When you have a function like this: public GetCustomers(Action<IEnumerable<Customer>,Exception> callBack) { } Wh...

Instantiating a System.Threading.Thread object in Jscript

I'm trying to create a new System.Threading.Thread object using Jscript, but I can't get the constructor to work. If I just do the following, var thread = new Thread( threadFunc ); function threadFunc() { // do stuff } then I get error JS1184: More than one constructor matches this argument list. However, if I try to coerce thr...

Adding Bcc to Email sending using .NET SmtpClient?

When sending email using the SMTPClient class in ASP.NET C#, how can I add bcc to the email? How can I add bcc to a MailMessage instance? ...