.net

Why is the winforms designer ignoring attributes on overriden properties ?

I've got a user control defined like this : public partial class FooControl : UserControl { private System.Windows.Forms.GroupBox groupBox1; ... I wanted to make groupBox1.Text accessible directly from the designer so I went for the obvious solution and created the following property in my FooControl : [Catego...

Does .Net have any built in constants for common numbers like million, billion etc?

Does .Net have any built in constants for common numbers like million, billion etc? EDIT: As has been suggested this was for readability reasons, rather than writing 1000000 or 1000000000. I know I can create my own just wanted to check that they didnt already exist before I did so. ...

Compare date in javascript

I have a custom validator that points to a Client side script to validate a textbox. My date and time are separated into two textboxes - one with date in mm/dd/yyyy format and the other with time in hh:mm am/pm format. I need to make sure the textboxes together are not greater than now. How can i accomplish this? Here is what i have s...

.NET invalid cast exception on double division

I am working on a .NET application to reduce image file sizes using ImageMagick. My application stores some "settings" in a Hashtable for use in various areas of the application. I am now adding a feature to reduce image size based on desired DPI in the transformed image. Basically, I am looking up the DPI in the unaltered image, calcula...

Unit Testing of framework 1.1 project with Visual Studio 2008?

Is it possible to write and run with Visual Studio 2008 some unit test and target a project written with framework 1.1? ...

Setting CAS Policy

I have a .NET application that users run from a file server. One of the .NET Assemblies requires Full Trust. I have signed the assembly. When setting the Code Access Security policy, which version of the .NET framework policy do I set? The application was built to use version 1.1 of the .NET Framework. Do I need to setup a policy fo...

Registration-Free COM Interop and Dependent Assemblies

Hi folks - We are working on an integration of a large MFC-based application with a handful of managed (.NET) add-ins. Communication with these add-ins is done via COM. Historically, we've just used the registry to make these add-ins available (as COM servers) to the application. But, now we're trying to use registration-free COM inter...

Miss behaviour on .Net Controls DataSource property..

I have a WinForm Application with a grid that contains a ComboBox on each row. All are binded to the same collection ( The collection might change behind that's why I don't want to have different collections for each Combo, also memory cost). The issue is that when I select some object in one combo it changes the selected object on every...

Tracking User's Actions in a Business Application

The company I work for is redesigning our application in .NET. Our application is sold using the Software as a Service model. We track all of our users actions in the software for reporting purposes (searching for things, downloading assets, completing forms, what is associated with the form they are creating, snap shot of the user's pr...

Open source PDF renderer for .NET?

Is there an open source .NET library that can render PDFs to images (for server-side processing)? I know of PDFsharp, AFAIK it can only create and process PDFs, not render them. ...

Why won't my program terminate?

I have a .NET Compact Framework app that can runs on three windows machines (Desktop windows and two WinCE machines) and on the WinCE devices, the process never terminates on exit, even if I call Application.Exit(). Besides .NET, it uses one COM component (which does everything on the UI thread). If I break into the debugger after exitti...

connection pool setting of SQL Server connection string

Hello everyone, I am using .Net 2.0 + SQL Server 2005 Enterprise + VSTS 2008 + C# + ADO.Net to maintain a legacy ASP.Net Web application. Here is the connection string the legacy application is using (the legacy application is using SQL Server authentication mode), My question is, I think the connection string is wrong, 1. since the se...

Is there an Alpha matcher for .NET Regex?

The usual alpha symbol for regular expressions \w in the .NET Framework matches alphanumeric symbols, and thus is equivalent to [a-zA-Z0-9], right? There is any [a-zA-Z] equivalent in .NET? ...

System.AddIn (Maf) Interconnection between addins

Hey, I want to use MAF in my project because I need a robust add-in architecture. Yet I come to a point where I need to call methods of an add-in from an other add-in. How can I achieve this with a flexible manner in which some add-ins should have dependencies over other add-ins or just use other add-ins' functionality when available. ...

xmlserializer required/mandatory attribute/fields validation

Is there an easy way to force the WebService .Net XmlSerialiser to check that an attribute is present? In the following example, I want the webService's caller do not forget to set the Price and the Currency: public class Quote { public decimal Price; public string Currency; } [WebService] public class MyWebService : WebService ...

OpenCV Multi-Threaded Thread Message

I am writing a program using .Net 3.5 and OpenCV 1.1. I have multiple threads that need to get an image variables from the web camera on my computer, the problem being I get memory violation errors when multiple threads try to access the camera at the same time. I know I can use PostThreadMessage and GetMessage to send a variable to the ...

Windows Mobile Web Services - works while tethered, not while using cell data network

I've written an ASP.NET web service that I would like a .NET 3.x application running under Windows Mobile 6.1 to communicate with. When the phone is connected to a desktop via USB/ActiveSync it can communicate with the web service flawlessly. When I place the phone on the cell network (unplug the USB cable) it is not able to communicat...

how database connection pool impacts performance?

Hello everyone, I am using .Net 2.0 + SQL Server 2005 Enterprise + VSTS 2008 + C# + ADO.Net to develop ASP.Net Web application. The ASP.Net Web application is database centric/driven. I want to know whether there are any performance reference data about what are the differences of performance when we turn on/off thread pool setting in A...

Auto increment Id's in .net

We need to store xml file in file system. The xml files should have a uniqueId ranging from (00000001 to 99999999) Is there a way to auto increment the ids for any new xml generated. The xml are stored in folder structure which is complex. I tried taking the count of xml files that this seems to be a slow operation. The application is de...

How do i measure how much data has been sent over a C# socket

I'm building an application that needs to charge users based on the exact bandwidth used by their connections. I could of course keep track of how many bytes i pass to/from send/receive but that doesn't include IP packet overhead which i'd very much like to include since we're talking lots of small packets of varying size. I could es...