.net

Apply stroke to a textblock in WPF

How do you apply stroke (outline around text) to a textblock in xaml in WPF? ...

Is there a .NET/C# wrapper for SQLite?

I'd sort of like to use SQLite from within C#.Net, but I can't seem to find an appropriate library. Is there one? An official one? Are there other ways to use SQLite than with a wrapper? ...

What is the .NET equivalent of PHP var_dump?

I remember seeing a while ago that there is some method in maybe the Reflection namespace that would recursively run ToString() on all of an object's properties and format it nicely for display. Yes, I know everything I could want will be accessible through the debugger, but I'm wondering if anyone knows that command? ...

Get Accordian Selected Index in ASP.Net C#

Im working on an ASP.Net app with c#. I am stuck on a problem with an accoridian. My accordian correctly displays data from a datasource which in this case in some text and then a list of images. On each accordians content there are the images to be displayed and then a button to add another image. This button links to another page t...

.NET Framework method to quickly build directories

Is there a quick way to join paths like the Join-Path function in Powershell? For example, I have two parts of a path "C:\foo" and a subdirectory "bar". Join-Path will join these and take care of the backslash delimiters. Is there a built-in method for this in .NET, or do I need to handle this myself? ...

How does one load a URL from a .NET client application

What is the preferred way to open a URL from a thick client application on Windows using C# and the .NET framework? I want it to use the default browser. ...

HRESULT: 0x80131040

The located assembly's manifest definition does not match the assembly reference getting this when running nunit through ncover. Any idea? ...

Prevent multiple instances of a given app in .NET?

In .NET, what's the best way to prevent multiple instances of an app from running at the same time? And if there's no "best" technique, what are some of the caveats to consider with each solution? ...

How are you using the Machine.config, or are you?

For ASP.Net application deployment what type of information (if any) are you storing in the machine.config? If you're not using it, how are you managing environment specific configuration settings that may change for each environment? I'm looking for some "best practices" and the benefits/pitfalls of each. We're about to deploy a bran...

what is the best way to display a 'loading' indicator on a WPF control

In C#.Net WPF During UserControl.Load -> What is the best way of showing a whirling circle / 'Loading' Indicator on the UserControl until it has finished gathering data and rendering it's contents? ...

NAnt best practices

I have here 300 lines long NAnt file and it is quite a messy. I am wondering if there is a any style guide for writing NAnt scripts and what are the best practices for doing so. Any tips? ...

How to programmatically determine param name when constructing an ArgumentException?

When constructing an ArgumentException, a couple of the overloads take a string that is the invalid argument's parameter name. I figure it would be nice to not have to remember to update this ctor param whenever I change the method's param name. Is there a simple way to do this using reflection? Update: thanks to the 2 respondents so fa...

Return to an already open application when a user tries to open a new instance

This has been a problem that I haven't been able to figure out for sometime. Preventing the second instance is trivial and has many methods, however, bringing back the already running process isn't. I would like to: Minimized: Undo the minimize and bring the running instance to the front. Behind other windows: Bring the application t...

Windsor Interceptors AOP & Caching

I'm considering using Castle Windsor's Interceptors to cache data for helping scale an asp.net site. Does anyone have any thoughts/experience with doing this? Minor clarification: My intention was to use Windsor to intercept 'expensive' calls and delegate to MemCacheD or Velocity (or another distributed cache) for the caching itself. ...

What is the correct way to make a custom .NET Exception serializable?

More specifically, when the exception contains custom objects which may or may not themselves be serializable. Take this example: public class MyException : Exception { private readonly string resourceName; private readonly IList<string> validationErrors; public MyException(string resourceName, IList<string> validationErro...

Profiling C# / .NET applications

How do you trace/profile your .NET applications? The MSDN online help mentions Visual Studio Team (which I do not possess) and there is the Windows Performance Toolkit. But, are there other solutions you can recommend? Preferably (of course) a solution that works without changing the code (manually) and that can be integrated in Visual S...

Open source .NET tools

Which is the best open source .NET tool you have used? Please list one tool per answer. ...

What is the best method of inter-process communication between Java and .NET 3.5?

A third-party application reads some Java code from an XML file, and runs it when a certain event happens. In Java, I want to tell a .NET 3.5 application, running on the same machine, that this event occurred. The total data transferred each time is probably a few characters. What is the best way of using Java to tell the .NET process t...

How can I load xml from a url instead of a file path in .NET?

We currently have code like this: Dim xDoc = XDocument.Load(myXMLFilePath) The only way we know how to do it currently is by using a file path and impersonation (since this file is on a secured network path). I've looked at XDocument.Load on MSDN, but I don't see anything. ...

Setting DataGridViewRow.Height slow

I have noticed that setting row height in DataGridView control is slow. Is there a way to make it faster? ...