I was reading a Business Primitives by CodeBetter.com and was toying around with the idea.
Taking his example of Money, how would one implement this in a way that it can be used similarily as regular value types?
What I mean by that is do this:
Money myMoney = 100.00m;
Instead of:
Money myMoney = new Money(100.00m);
I understand ...
How do I check to see if an element exists within a given element before trying to add it?
Background: I have an XDocument X that contains as a child element Flowers which subsequently contains a series of elements that are each named Flower. Each Flower already has 2 child elements and I would like to add a 3rd element called Price. ...
It's actually a noticeable difference that I've seen but cannot explain. These timers have intervals set to 1ms (the lowest available), but while it's minimized, it seems to tick faster? Could anyone explain this phenomenon to me? And if possible, explain how to reproduce the effect while the window is maximized?
...
I am developing a document database application that handles TIFF images. When annotating images, in order for the user-interface to present only black and white as choices for bitonal (Format1bppIndexed) images versus multiple colors for images with a higher color depth I need to test for whether or not a TIFF is bitonal. Here is my f...
I have one user control named XtraTreeList(It is combination of the treeview and datagridview) in which I want to get the location of the cell and nodes, but I can not find any property or method for that. Anyone have used it or any idea about that?
Or can I use the graphics approach to find the location of the cell or nodes ? Like, thr...
I'm P/Invoking out to Graphviz as shown here. When I wrote that blog entry, the code worked just fine. Now, I'm putting together an HttpModule that renders Graphviz graphs using that code, but I get an AccessViolationException at agmemread.
// Native signature
Agraph_t agmemread(char *);
// P/Invoke Signature
[DllImport(LIB_GRAPH)]
pri...
(I'm sure this has been answered already, I searched but couldn't find it)
I need to create an instance of several generic types during runtime. That is, I have a variable named i that holds a number between 0-4, and I need to create an instance of the Type object for either Action<>, Action<T1>, Action<T1, T2>, Action<T1, T2, T3> or Ac...
How can you determine whether a particular .Net assembly has already been ngen'd or not? I need to check from code. Even invoking the command-line would be fine. At the moment I can't see any way of determining this.
...
I'm trying to deploy a .NET library using WiX.
The MSI copy the library in the GAC (Global Assembly Cache), and I can find my library on Windows\Assembly. "Cool" I said.
But probably I missed something important, since installed applications using that .NET library doesn't find the assembly, and Visual Studio is unable to offer the lib...
Does anyone know an OCR library for .NET that will run also on Mono? All options I've found are C# wrappers to libraries that run only under Windows. I need my program to run on both Windows and Linux.
...
Hello everyone,
I am using SharePoint Server 2007 Enterprise with Windows Server 2008 Enterprise. I have deployed a publishing portal. It is using a custom forms authentication solution, which is described in the following URL. I am developing using VSTS 2008 + C# + .Net 3.5 + ASP.Net + SharePoint Server 2007 SDK.
http://msdn.microsoft...
Where would I set default values that I want to use throughout a project and only define once?
An example would be a default margin, or a color that I want to use in multiple places.
In pure C, one way to do this would be with a "defaults.h" header file with "#define"s.
...
I'm working on a .NET application written in C# and WPF. In this application we will authenticate the users towards an Active Directory server. In the end we might want to support other LDAP implementations too, so if I can build this without being ActiveDirectory-specific that would be an advantage.
What's the best approach to get sta...
I found SubSonic, but I'd rather roll my own with a few buddies.
I've never done something like this before, but if you tell me technically how I should proceed, I can figure it out.
I want to have a sort of visual designer. Ask the user what tables there are going to be, the relations, what fields, which are primary keys, etc.
Then g...
I have seen looking for a way to get the list of ProjectItems (files) for a known class, which generated from several partial classes. I use CodeModel to search for a class and accessing the ProjectItem to do stuff, which works fine for normal classes. But when it comes to partial classes, the ProjectItem property give one file but dont ...
Hello,
We have a Message broker application in Java which accepts messages(XML). It validates the XML against XSD and calls a .net Webservice and passes the validated XML.
We have a requirement to do the same in .net. Do we have any API's to do this one. I am looking for a system that takes care of logging in case of errors or some kind...
I'm working on an integration project where I'm talking to JMS framework using TIBCO .Net client.
A colleague is recommdending a design decision based on a fear of receiving too many messages suddenly in a way that our application can't handle it. We are using Asynchronous mode while receiving messages. I'm new to that topic so I couldn'...
I've subclassed Canvas so that I can override its Render function. I need to know how I can load a bitmap in WPF and render that to the canvas. I'm completely new to WPF and I haven't found any tutorials that show you how to do something so seemingly trivial. Step-by-step instructions with examples would be great.
...
I have written a program in C# that sends text to COMx.
I wish to test it using HyperTerminal, meaning I want to read the text that I send with my program. When I set the WAIT FOR CALL in HyperTerminal, my program is refused access to the given port.
How can I test my program? Is it possible?
...
Hi,
I have to connect from a Java client to a WCF Web Service which has the following binding configuration:
<basicHttpBinding>
<binding name="basicHttpBindingSecurity">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Basic"/>
</security>
</binding>
</basicHttpBinding>
I'...