.net

ISO 4217 - How Do I retrieve the numeric value(840) for the currency code "USD" in .NET?

For the currency code ISO 4217, how do I retrieve the numeric value from within the .NET framework? For example, the numeric value for the US Dollar is 840. ISO Code 4217 ...

windows.forms Database-driven application framework

Hey folks ! I'm looking for a free or open source windows.forms based framework which facilities database-driven and CRUD apps. I appreciate your input. Thanks ...

Moving from being a C# "Programmer" to a .net "Developer"

I've been coding in C# for a while, A little over a year professionally, but I think I'm ready to learn more about the CLI and the .net framework, learning about things such as assembly versioning, deployment, CIL, and tons of things I'm sure I'm not even aware I don't know. Any good books or other resources? ...

NHibernate DuplicateMappingException when two classes have the same name but different namespaces

I have a class in my domain model root that looks like this: namespace Domain { public class Foo { ... } } I also have another class with the same name in a different namespace: namespace Domain.SubDomain { public class Foo { ... } } For my mappings, I have a Mapping directory with a subdirectory called SubDomain that contains ...

ADO.NET - Manually filling out column

(Using Visual Studio 2005 / .NET 2.0) I have a DataSet which is being prepopulated from another module using SQL. All the values in it are fine and will stay the same as they are. But once I retrieve the DataSet (and assign it to a DataTable since it is a one-table set) I need to add an additional column onto the end of the DataTable a...

Handling a multi-dimensional data structure in .Net 3.5 and above

I want to build a 2 dimensional (non ragged at this point) object array. I can easily build a 2 dimensional Array[,], and will do so if it is the best option available, but have tended to avoid arrays in favour of the advanced functionality of .NET's List and Dictionary structures. I could also use a List<List<T>> to store a 2 dimensio...

(IronPython Studio) Where is the console?

Hello. I am new to IronPython. I've read the MSDN article http://msdn.microsoft.com/en-us/magazine/cc300810.aspx and for what I've understood I can set code with IronPython on the run. I created a simple Windows Forms project in IronPython studio and ran it, but I can't find on the IDE anywhere to type code into. Isn't it possible, am I ...

How to implement a GetHashCode compatible Equals method, when the space is greater than 32 bits?

In .NET you need that Equals(object) and GetHashCode() are compatible. But sometimes you can't: public class GreaterThan32Bits { public int X { get; set; } public int Y { get; set; } } Because the data density is greater than 32 bits, and GetHashCode returns an Int32, you will have 3 solutions (assuming a correctly implemented...

How to set minOccurs to 1

I' building an ASP.NET web service. I've got my code defined as below, but I can't figure out how to the the wsdl to specify the minOccurs of the FirstName and LastName properties. I want those as required, and can not be empty. Is it possible? [WebMethod()] public void TestMethod(TestClass Test) { ... } [Serializable] public ...

Troubleshooting the built-in Visual Studio 2008 WebDev.WebServer.EXE

How do I begin to troubleshoot Visual Studio 2008's WebDev.WebServer.EXE? I'm trying to run the default ASP.NET MVC project. And I keep getting this message from Firefox: Unable to connect Firefox can't establish a connection to the server at 127.0.0.1:52589. * The site could be temporarily unavailable or too busy. Try again in a...

Garbage collection in .Net 4.0

Is there any change in .Net 4.0 garbage collector execution? ...

What Are The Advantages/Disadvantages of Using Both VB.Net and C# In The Workplace?

At a colleague's workplace, a decision is trying to be made about whether to use both languages in the workplace or to standardize on one? There are some VB.Net developers and some C# developers. What advantages or disadvantages would there be to using both or to using one? Edit: To clarify this question, the question is not asking the...

Why does this C# class declaration compile?

This question really is kinda pointless, but I'm just curious: This: public sealed class MyClass { protected void MyMethod(){} } compiles, but gives a warning while This: public sealed class MyClass { public virtual void MyMethod(){} } doesn't compile. Just out of sheer curiosity, is there a reason for this? ...

Issue with inheriting custom control

Hi, I have an user control in our library that I need to inherit and make some update to it. The issue that I'm having right now is that I cannot instantiate the new user control directly. I have to call a method in the library that will create and pass an instance of the user control. Please check sample code below. I tried to use cas...

.NET Remoting Client's Problem when running on the machine with Multi NICs

I built a .NET Remoting Client which works quite fine on the machine of single NIC, and lots of testing messages received via remoting event. But when additional NIC was added, the Client seemed to be able to connect the remoting Server, but the testing messages cannot arrive anymore. From debugging, the server end did trigger the even...

Get objects by value out of cache

Abstract I am writing an application which has a few object caches. The way it needs to work is when an object is retrieved from the cache: object foo = CacheProvider.CurrentCache.Get("key"); foo should be a local copy of the original object, not a reference. What is the best way to implement this? The only way I have in mind so far ...

(.net) CriticalFinalizerObject - What does it really do?

Hello. My understanding about this class is that you should use it when you want to be sure that the Finalizer(destructor) or the class is called, but from a couple of tests I did, it doesn't seem to be true. If it does not make sure that the dispose method is called, is there any other way of doing it? For example, if i want to make sur...

Automatically print a new order from web application

A fast paced foodservice company is wanting me to develop a web order form so customers can place orders online for pickup or delivery. One of requested requirements is to automatically print a newly generated order to the service counter. I'm using c#, asp.net, SQL on 3rd party hosted server. What type (web, console, winforms) of app...

Should I use a 3rd party CMS or build an ASP.NET MVC site for a small website?

I'm primarily a .NET desktop developer, but I've done some static HTML/CSS websites in the past. I'm currently taking on a web project for a local restaurant and one of the most important features is the ability for the owner to edit the content (e.g., add events to a calendar, adjust the menu, post news items, update a photo gallery). ...

WCF object properties setting to NULL when returning from my service

Hi there, I have a WCF service that returns a complex object (just a class). I can step into the construction on the object and see that it's properties are being populated but when I hit the F11 key on the return statement of the method that populates the object and i'm on the next line back in the client all the objects properties are...