.net

Get FontWeight/FontStyle/TextDecorations from WPF RichTextBox

How can I detect the current text formatting at the cursor position in a WPF RichTextBox? ...

What is gcnew?

I stumbled across this code and am too proud to go and ask the author what it means. Hashtable^ tempHash = gcnew Hashtable(iterators_); IDictionaryEnumerator^ enumerator = tempHash->GetEnumerator(); What is gcnew and how important is it to use that instead of simply new? (I'm also stumped by the caret; I asked about that over here.) ...

What does the caret mean in C++/CLI?

I just came across this code and a few Google searches turn up no explanation of this mysterious (to me) syntax. Hashtable^ tempHash = gcnew Hashtable(iterators_); IDictionaryEnumerator^ enumerator = tempHash->GetEnumerator(); What the heck does the caret mean? (The gcnew is also new to me, and I asked about that here.) ...

How to use HttpWebRequest (.NET) asynchronously?

How can I use HttpWebRequest (.NET, C#) asynchronously? ...

Is it possible to override a .NET client's default timeout on a call to a webservice?

I'd like the web service proxy class to wait more than 2 minutes ...

What is .net dynamic data and why would I use it?

What is .net dynamic data and why would I use it? ...

Design problem: shared, synchronized, data access in application... the best approach?

I have a web application (asp.net) where work items are submitted and allocated to users according to their workload. A user's workload is calculated using an algorithm based on the number of items currently allocated to the user (and some other factors). Each new item is allocated to the user with the lowest current workload, increasin...

How can I check WCF address access and avoid AddressAccessDeniedException?

Is there a way in the .NET framework to validate that a process has access to a specific WCF address namespace without attempting to call ServiceHost.Open and capturing the resulting AddressAccessDeniedException? Right now if that exception is thrown I restart the service in elevated (administrator) mode so that I can properly reserve t...

Open Source .Net Reporting Tool

I am looking for a reporting service/tool for visual Studio. My only restraint is my web server is off limits to me as far as installing ANYTHING. So I need something I can just include in my project. My users need to be able to export a report to PDF and without being able to use Crystal I am pretty much lost. Any ideas? ...

Embedding Powershell CTP 2 in C#

I have an application that has Powershell 1 embedded into it, but we need to be able to use Powershell STAThreaded which is available in Powershell 2 CTP. Currently, System.Management.Automation is at 1.0.0.0. Does anyone know how to get Visual Studio to use the newer dll? ...

Missing ComponentOne licenses.licx file

I'm working on an application that makes extensive use of ComponentOne's C1FlexGrid. Of the dozens we use, three are missing their licenses.licx file and cause the demo splash screen to pop up while I'm starting the application. Is there any way to determine which forms are causing this behavior. Short of checking hundreds of directorie...

Counting instances of a class in the AppDomain

I wonder if there is a way to either programatically or using a third party tool (profiler?) get an overview of how many instances of a class are currently active in the AppDomain (including or excluding derived classes), and even better, where they are allocated (not sure if that is even possible). I know that I could change my own cla...

Reasons to learn MSIL

Hi, Learning MSIL is fun and all that. Understanding what is going on "under the hood" can in many ways improve how you write your code performance-wise. However, the IL that is produced by the compiler is quite verbose and does not tell the whole story since JIT will optimize away a lot of the code. I, personally, have had good use of...

How to run a program in 32-bit mode on Vista 64?

I am building an app that talks to an Access database via OleDB/Jet. There is only a 32-bit Jet provider, no 64-bit provider, so the app needs to be running in 32-bit mode. My dev box is Vista 64, so I set the project to build for x86 instead of any cpu. That gets my app running and talking to the database. But now I want to run some un...

C# for 64bit OS?

How can I make my compilation optimized for Windows 64 bit? ...

Interop Controls not picking up XP Styles

I created an Interop user control in VS2005. When the user control is shown inside VB6, it does not pickup/use the XP styles (The buttons and the tabs look like VB6 buttons/tabs). How do I get the XP styles to work with my control while it is in VB6? ...

WCF - NetTcp and basicHttp with SSL in single setup possible without IIS7

Is it possible to have both NetTcp bound endpoints, and basicHttp bound endpoints with SSL within a single deployment, either using Windows Service or IIS6? ...

Is it possible to convert between Socket and TcpClient objects?

Here's another C#/.NET question based merely on curiousity more than an immediate need ... If you had a Socket instance and you wanted to wrap it in the higher-level TcpClient class, is that possible and how would you do it? Conversely if you have an instance of TcpClient, is it possible to get the underlying Socket? ...

How can I keep a console open until CancelKeyPress event is fired?

What is the best way to keep a console application open as long as the CancelKeyPress event has not been fired? I would prefer to not use Console.Read or Console.ReadLine as I do not want to accept input. I just want to enable the underlying application to print to the console event details as they are fired. Then once the CancelKeyPr...

What's the best audio compression library for .NET?

I'm looking for a good audio compression library for .NET. Anything using MP3 is out (because of the licensing issue). Basically I just need to be able to compress regular WAV audio data into some format, and decompress back to WAV. Preferably the code would be all .NET (C# or VB.NET), but I don't think this is likely. It should eith...