Can any one suggest a step by step example for using moQ framework
Can any one suggest a step by step example for using moQ framework. any guidelines or thumbrules that has to be followed while mocking objetcs . can be much help. thanks. ...
Can any one suggest a step by step example for using moQ framework. any guidelines or thumbrules that has to be followed while mocking objetcs . can be much help. thanks. ...
Hi, We are trying to provide multiple signature areas in the inkpicture control. However if we call SetWindowInputRectangle multiple times it seems to erase the previous signature. Is there some internal rect which we can set for this or some event (NewPackets) where we can cancel user input? Thanks, Ashish ...
I've seem some other posts regarding datagrids that allows grouping. I've downloaded the DevExpress DataGrid for Windows Forms but it really looks complicated. I actually need a Datagrid that derives from DataGridView as a lot of my data binding is code driven and uses the DatagridView classes. I've managed to find this OutLookgrid on C...
Is there some clever way of getting the date and time of when the dll was built/compiled? I’m using the assembly version numbering and reflection to retrieve and display this info when the app is deployed. But in some scenarios it would be more convenient to know when then dll was actually compiled rather than the auto incrementing vers...
I have a managed assembly that gets called via COM Interop. Like a VBScript client, a Perl client, and so on. The classes are decorated with [ClassInterface(ClassInterfaceType.AutoDual)] [GuidAttribute("ebc25cf6-9120-4283-b972-0e5520d0000E")] [ComVisible(true)] Then of course I do the regasm thing, and all the methods work just fi...
Hi, I use Office Primary Interop Assemblies for Office 2003 and 2007. On download page of PIA, it is mentioned that .net framework 1.1 is required. I want to know if the requirement of version 1.1 - is it minimum version that is required? Or is it strict requirement. In other words, If I have .net version 2.0 or 3 or 3.5 and dont hav...
I want to use Linq expression for some dynamic features. I need And, Or and Not expressions.. I couldn't get much.. We want to check whether certain feature has been enabled or not in our system and based on that we will decide whether to show the menu item or not. we have formed rules in XML format, I know to convert the rule to AST bu...
Hello community, I wanted to ask you what is the best approach to implement a cache in C#? Is there a possibility by using given .Net-classes or something like that? Perhaps something like a dictionary that will remove some entries if it gets too large but whose entries won't be removed by the garbage collector? Thanks in advance Seb...
I need to "insert" an element at the given index in a small array. That is, to move all elements with greater indices 1 place to the right. What is the fastest way to do that in .NET? NOTE: I added my own answer, but I am still looking for an explanation and faster alternatives. EDIT: I do need an array, not a List<T> and not a linked...
The common wisdom says that for small enough arrays insertion sort is the best. E.g., Timsort uses (binary) insertion sort for arrays up to 64 elements; from Wikipedia: Some divide-and-conquer algorithms such as quicksort and mergesort sort by recursively dividing the list into smaller sublists which are then sorted. A useful optimi...
I am launching another process from by C# application, and came to a problem: is there any way to read process output char-by-char, not line-by-line? I desperately need that because the other process is a command-line engine, and I need to send a command to it, read output and somehow understand when it is done. The way it indicates that...
Hi, I think I already did that once upon a time, but I can't get it to work... I've got a class that contains a variable List<string> InputList; When serialized, it's obviously like: <InputList> <string>foo</string> <string>bar</string> </InputList> And, call me a control freak, but I want: <InputList> <Input>foo</In...
I would like to use my own custom XML format in my Web.config. In .Net 1.1 I was using IConfigurationSectionHandler combined with XmlSerializer. Because IConfigurationSectionHandler is depreciated, I want to do the same with ConfigurationSection. I tried it like this: protected override void DeserializeSection(System.Xml.XmlReader r...
IObservable and IObserver would be quite handy right now for something I'm working on. Is there a similar set of interfaces and classes available for .NET 3.5? Or must I wait for .NET 4.0 before I can use them? ...
Hi, Since last weekend there is a problem logging in on our vendor site with IE only. In FF3 and Chrome it works fine. This is a simple ASP.NET (1.1) site using the following code for the login button: <asp:button id="btnLogin" runat="server" CssClass="dll-button" Text="Login"> </asp:button> In HTML this is converted to <input typ...
I'm writing an application that does a lot of batch printing, but each print is taking several seconds to complete. I've tracked it down to the getter of property PageSettings.PrintableArea in System.Drawing.Printing - each call to that takes over one seconds to finish! Can anyone shed any light onto why this is, and also how it can be ...
Right, my application occassionally kicks off a background thread that does some stuff. As its doing its stuff it also updates a progress bar on the main window. It does this by calling Invoke to get the main thread to update the interface. When the user closes the application, I want to wait until all the background threads are finis...
I have a WCF service hosted in WAS using net.tcp. Am I correct in thinking that this runs under a svchost process? If so, how do you use "attach to process" in VS to debug? Thanks ...
If I have two business objects, with a related field (foreign key CountryId), how do I display the CountryName in place of the CountryId when I display a list of the employee class? public class Employee { public int Id { get; set; } public string FirstName { get; set; } public string FamilyName { get; set; } public int ...
I'm planning on using the SynchronizationContext class to perform some cross-thread marshalling of UI updates. The idea is to avoid having to have a reference to the main form (i.e. the one in Application.Run(form)) just so I can say mainForm.BeginInvoke(); However, one thing that isn't clear from the documentation, is that when you ca...