.net

.NET Remoting Client Config File multiserver Object

I'm in the middle of a crisis. How can i register a object in configuration file multiple times? Its simple i have server1, server2 and server3 that have the object (SomeObject) and i would like to do something like this on Clients configuration file: <client> <wellknown type="IRemCalc.ICalc, IRemCalc" url="http://loca...

Is it possible to debug code that is being unit tested in Visual Studio 2010?

I have some code that is failing tests, but I can't understand why. I made the error of making a big chunck of code without making tests first / making tests during the coding. Now it simply doesn't work and I'd like to know if it is possible to put break points or something in the code that is failing so I can check on what is happening...

Mechanics of Asynchronous Threads

In .NET when you make an async call I understand that this call is resolved in a seperate thread thus not blocking the original thread where the call was made. How does the mechanics behind this work. Is a new thread spawned on every async call or is there a shared async thread that handles these operations? If it is a shared thread, d...

What are Contexts in MSTests?

I keep wondering what are Contexts when it comes to Unit testing. There seem to be 3 options for doing tests in Visual Studio: All Tests in the Current Context All Tests in Solution All Impacted Tests Point 2) is quite obvious to me, but I don't understand what Points 1) and 2) mean. Thanks ...

Xml Dom library with unit tests

Googled for a Xml Dom open source library that ships with unit tests, but could not find any. Are there any dom libraries, java or .net that have unit tests? ...

WPF - LayoutStates VisualStateGroup (non silverlight)

Hey guys I have been trying to the LayoutStates state working in WPF when I realised that its a Silverlight only feature (gurrr). Just wondering if anyone knows of an alternative to achieve the same result? If not can the same result be easily achieved manually? Specifically I'm trying to slide in new items when I add them to the list...

Is there a public site to make and share live examples of C#/.NET code?

For instance, we now have that in the StackExchange universe for SQL Azure (which handles general SQL examples very well). I was thinking it would be very nice to have a similar environment to be able to have a few class files and a console program to be able to demonstrate core basic C#/.NET programming techniques - live. Is there suc...

.NET Assembly Referencing 101

I have the following class located in Assembly A. The assembly has a reference to StructureMap 2.6.1. public static class Bootstrapper { public static void Bootstrap(string databaseName) { StructureMapBootstrapper.Bootstrap(databaseName); } } I'm referencing Assembly A in a completely different Assembly (B) and I"m...

Using Debugger Visualizers in Visual Studio without having to copy its dll assembly to VS's folder

I know it is possible to create Debugger Visualizers since Visual Studio 2005. Now, what I'd like to know is if it is possible to use our Debugger Visualizers without having to put them in Visual Studio's folder. Although it is useful to have Visualizers for .NET's types as Bitmap, Image, arrays, etc, I wouldn't like to put in VS' fo...

How to join Jagged array with separator using string.Join?

How can i solve below string join error. i converted int value to string value but error occurs.... Look Join method using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data; namespace SortArrayYusuf { class Program { static void Main(string[] args) { //...

Why attachment size given by Outlook programming interface is always wrong?

Hi, Trying to use Outlook Interop in C#, I noticed a curious thing. First I get the size of an attachment with Attachment.Size property. Second, I save the attachment to a file using Attachment.SaveAsFile method. Comparing the real size of a saved file and a size given by Outlook, I notice that the real, saved file is always smaller...

How to invoke INotifyPropertyChanged

Hi, I have implemented the INotifyPropertyChanged interface like this, private int total; public event PropertyChangedEventHandler PropertyChanged; public void NotifyPropertyChanged(string propertyName) { if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } public ...

Logging stack information

Hello all Do you know any tool that can log what functions where called with what parameters ? Not interested to write that code myself but thought that there maybe some tool that capable doing so ... Thanks. ...

Slide object using For Loop (C#)

Hey All, I did quite a bit of searching around and didn't find anything of much help. Is it possible to "slide" or "move" using C#, an object from one Location to another using a simple For loop? Thank you ...

ILMerge and Project References

I have a VS solution (.sln) that has the following structure. Project A Project B (contains reference to Project A as well as references to 3rd party assemblies like NHibernate, StructureMap, etc) I want to use ILMerge to roll the 3rd party assemblies into the ProjectB.dll. However, I don't want to merge ProjectA. I've used the pr...

Comma for thousands separator on a bound WebForms TextBox.

I'm trying to format a data bound value as below, but I keep getting a space as the thousands separator, i.e. the displayed text is always "12 340.00" when it should be "12,340.00". What am I missing? <asp:TextBox ID="budgetText" runat="server" Text='<%# Bind("Budget", "{0:#,0.00}") %>'></asp:TextBox> ...

.NET4: How to apply dynamic binding to anonymous delegates with returns?

class MyClass { public event Action<string> OnAction; public event Func<string, int> OnFunc; } class Program { static void Main(string[] args) { MyClass mc = new MyClass(); /// I need to handle arbitrary events. /// But I see no way to create anonymous delegates in runtime /// with arbitr...

Visual Studio 2008 Installation Error...

Hundered of times there, I tried to install VS 2008 on my different systems already having Framework 2 installed, it failed to install. I tried it may a times even on different systems. It runs but after Serial No. and next i see error .net framework 3.5 installation failed and there down a list of all componetns it shown which have ...

What .net certifications I can do?

Hi, I am working on .net 3.5 on windows and web technologies . Can any suggest me regarding certification details, how can I proceed? What certifications i can do? Thank you nRk ...

RSA decryption using only D, Exponent and Modulus

I'm trying to decrypt using RSACryptoServiceProvider, but I only have the modulus and d pair as a private key and also the exponent. RsaParameters struct wont make do with these. It rejects me upon decryption with an exception "Bad key". To my understanding, this pair is enough to decrypt without the entire DQ DP INVERSEQ parts. More o...