Ran into this while converting a VB.NET interface to C#; the VB version defines an event which doesn't conform to the typical (object sender, EventArgs e) signature:
VB
Public Class SomeType
' Does *NOT* inherit from EventArgs
End Class
Public Interface ISomething
Public Event SomeEvent(sender as Object, value as SomeType)
End...
Is there a library for testing the functionality of already compiled binaries? Something like unit tests but for already compiled executables, that should allow me to specify and verify rules regarding the behavior of the program for specific inputs and scenarios. I'm specifically interested in something targgetting the .NET platform, bu...
In short I want to prevent objects being instantiated anywhere except in designated static methods in a object factory class.
Is this possible?
...
I am trying to write a RegEx in .Net to capture the whole function from a list of function that look something like this.
public string Test1()
{
string result = null;
foreach(var item in Entity.EntityProperties)
{
result +=string.Format("inner string with bracket{0}", "test");
}
return result;
}
public string Test5()
{
return str...
I've a moderate-scale web-app with an SQL-Server based backend DB.
My DB overview -
http://stackoverflow.com/questions/1667802/generic-suggestions-for-sql-2005-framework-design-and-implementation
My App framework overview -
http://stackoverflow.com/questions/1729199/l2s-linq-to-sql-or-ef-entity-framework
So, for now as we'...
I am getting the following error:
Could not load file or assembly 'System.Web.DynamicData, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
I've researched the problem and some of the solutions are pointing to Turning on Assembly Binding Logging.
...
What are the best practices for writing code that can be cross compiled on .NET (windows) and Mono (linux)? Although I am very familiar with .NET, I am not that experienced in Mono and all its gotchas. Has anyone seen a good blog post or best practices paper on this, which I have not been able to dig up? I would be sticking with C# 3.0 l...
I have a simple Windows Form application that is using the .net 3.5 compact framework.
I have a UserControl that I have created to show a Message to the user(I don't want to use the MessageBox as the close icon is too small)
How do I get my UserControl to show on top of all of the other Grids and controls? The UserControl is declared...
Hi all,
I have this code structure:
public abstract class ContentEntryBase
{
public string UniqueIdentifier;
public string Title;
public abstract ContentType contentType { get;}
}
public class TextArticle : ContentEntryBase
{
// Holds plain / HTML text as content
public override ContentType contentType {
...
Looking for clarification on this...
I've heard that 'everything' in .Net inherits from Object. I've also heard that the difference between value types and reference types is that reference types inherit from Object and value types do not.
My understanding was that everything was an object (inherits from System.Object); but value type...
I am looking for a way for some controls to have Anchor = Top, Bottom, Left, Right at design time so they would change when I scale the parent form. But doesn't do this at runtime when the parent form is scaled.
Is there something like this?
...
If I would build a big WCF RIA Services application with multiple domain services how could I have certain entities, which are shared between those domain services and exposed by them in different context. For example I could have a Cutomer entity, which is exposed both by Orders and Loyalty modules/domain services. At least my own exper...
I have one table INVOICEDETAILS that contains a PRODUCTID among other things. I want to create a combobox that gets all possible PRODUCTID values from the INVENTORY table but save the selected value to the INVOICEDETAILS table.
I can fill in the combobox with the INVENTORY values via the DATASOURCE property, but what I can't figure out...
After spending a couple months studying DDD methodology, I've now began to apply these concepts into actual products at my company. In fact, I've been tasked with creating a suitable and maintainable architecture for future development.
We have decided to make use of the following technologies: EF4 (really v2), Unity
The amount of inf...
how do you make a copy of a project in .net?
...
To recreate this behaviour, you need to create a pop-up form with the following properties:
(1) ShowInTaskBar = False
(2) Display the form with the Show method and loop until the form is not Visible.
(3) In order to close the form when the mouse is clicked out of it, override OnDeactivate, and set visible to False.
Next, create anoth...
I was thinking of creating a desktop application and for the user interface of the application I thought that HTML will be the best option. But I needed some way to generate the HTML for the application from the data structure that it holds.
So I was wondering if it was possible to reuse the ASP.NET engine so it renders the pages but ...
I have a Windows Domain here that runs Exchange 2007, and I need to programmatically create new Mailing Lists.
From what I could gather so far, Exchange mailing lists are just normal AD Groups, so I mainly have to worry about the interaction with AD. I used the System.DirectoryService namespace to query AD, but I'm not sure what the cor...
When I use XmlReader.ReadOuterXml(), elements are separated by \n instead of \r\n.
So, for example, if I have XmlDocument representatino of
<A>
<B>
</B>
</A>
I get
<A>\n<B>\n</B>\n</A>
Is there an option to specify newline character? XmlWriterSettings has it but XmlReader doesn't seem to have this.
Here is my code to read xml. Not...
I've recently upgraded my development machine from Windows XP to Windows 7. How can I tell which w3wp.exe process belongs to which App Pool on a desktop running Windows 7?
On a server running IIS6, you can run c:\windows\system32\cscript iisapp.vbs
On a Windows 2008 Server running IIS7 you can run appcmd list wp
But what about on my...