.net

How to implement simple multithreaded function

Hi I need to implement simple function that is called from multiple threads. The logic of the function is simple - think of horse races - only the first horse can get golden medal once we have a winner the race is over. class ConditionalOrderGroup { private volatile bool _locked = false; private List<ConditionalOrder> _Conditio...

C# data type on var

var data type take more time to compile (i.e convert in to IL ) so why we need var datatype as well as compliler know the particular dattype at runtime(i.e Compile time only) so when am using this may program may have chance to reduce the performance. any one explain this concept with example and compile time duration please..... ...

How do appDomain provide Isolation.

In my window forms application, I create a Appdomain say sandBox. In this sandbox i excute some code Say TestMethod from TestAppdomain Class. This class is in Test.dll which is not loaded in the current appdomain (Default appdomain). Now while executing TestMethod some exception occurs, then I want the sandbox domain to be unloaded and ...

I can't pass a value to view

Hello I am just playing with ASP.NET MVC 2 for learning. I can pass my models to view but after spend 1-2 hour i am unsuccessful to pass data to view.For example: www.example.com/home/show/asdf i am trying to get asdf string for show it on screen. public ActionResult Test(string ID) { return View(ID); } With thi...

Editing child objects of a combo box using c# and Wpf

Hi Backgorund I am currently writing a program that allows a user to select a manufacture from a combo box. The combo box is created in wpf using the following wpf code segment: <ComboBox Height="23" Margin="40.422,128.423,229.908,0" Name="itemProductManufacture" ToolTip="Click to open drop down menu" VerticalAlignment="Top" Text="Sel...

Accessing Mainframe transactions using .Net 4

Hi all, I am looking at re-writing an application (currently in C) which uses HIS 2004 (Could use 2009 if required) to access mainframe transactions. Is there a decent framework which I could use to connect and call mainframe transactions and relay any infromation into the existing system? ( I am developing in a .Net 4 environment) to r...

linker for .net application

I have a desktop(winforms) application, and I'm looking for .net linker that links the assembly to assembler level(lower than IL) in order to prevent reverse engineering. another solution might be acceptable as well. does anyone know of such a linker? ...

Mixed mode assembly in .NET 4

I wrote a class library in .NET 2.0 for database access some 2 years ago and have been using it all along on .NET 2.0, 3.0 and 3.5. In the current project I'm working on (which is a .NET 4.0 application), tried using the old faithful class library and I got the following exception: System.InvalidOperationException was unhandled Me...

Do you recommend procedural methodology software developement for small database application in dot net?

Hello As a new entry to the software development industry I tried to develop my programming skill using different ways. One way I found out is as many suggests by reading code from other authors. When I begin to develop, I want to use objected oriented design paradigm for any application. As a start I begin with small database progra...

Need help in Event Handling

I have a delegate delegate string Mathop<T,F>(T a,F b); and I am declaring an event like event Mathop<T,F> someevent; But here I am getting an error. It says 'T' could not be found. I want my Mathop delegate to work as an eventhandler for my event. What I am doing wrong here. ...

How to detect .NET framework installed in a web page (pure HTML or PHP)

I need to display additional information on a web page (PHP) if one of the following criteria is met: .NET Framework Installed on the client machine in lower than 3.5 Impossible to determine if .NET Framework 3.5 is installed or not on the client machine I know that some browser (if not only one, IE) is sending that information in hi...

FIT-like testing in the .Net world

I managed to get FIT up and running using fixtures implemented in C#. I really like the concept, but the infrastructure does not fit in my environment. FIT and source code management do not work together easily and having a Java server up and running to execute the tests is also not very nice. Does anybody know similar tools which are b...

Export Data to CSV file

We have more than 65,536 rows of data to export(write) in .csv file. But Excel(CSV) supports only 65,536. Excel supports multiple workbook, so we can write the data in multiple workbooks . But CSV doesn't support this feature too. Is there any other way to do this. Could any one help on this? ...

RaisePropertyChanged<T>(string propertyName, T oldValue, T newValue, bool broadcast)

Hi, I was trying to get the RaisePropertyChanged<T>(string propertyName, T oldValue, T newValue, bool broadcast) working but could not get it to work. I am not implementing it in any real world scenario but just for learning it. If I raise broadcast the usual way only then it works Messenger.Default.Send<PropertyUpdateeMessage>(new Pr...

MSBuild 4.0 failing on XMLQuery task (from MSBuild Community Tasks package) with error MSB4018

We use MSBuild to run a project which, among many other things, reads some values from an XML file by means of the XMLQuery task from the Community Tasks package. It worked fine under MSBuild 3.5 but when run under 4.0 it fails with the following message: error MSB4018: The "XmlQuery" task failed unexpectedly. System.Xml.XmlException: ...

Remove case sensitivity from FormsAuthentication.Authenticate of user name/password

The below code and the config works fine, but force to enter user name/password case sensitively, i want to make it non case sensitive. Code: protected void LoginButton_Click(object sender, EventArgs e) { try { string uid = UserText.Text.Trim(); string pwd= PwdText.Text.Tr...

DPAPI mixing password and configurable setting in web.config

Hi, I am developing a website and has some password that need to be stored in web.config. I intend to store it in app.settings. However, base on what I understand, if I use DPAPI to secure the data, the entire app.settings section is encrypted. This means that it is not possible for me to mix configuration information like number of row...

Is Arial Unicode MS right font for WinForms UI?

We have .NET WinForms based application and it is expected to work on at least 9 languages including English Spanish Russian Simplified Chinese Traditional Chinese Korean Japanese Our application shall work on Windows XP (SP3), Vista, Windows 7 and Windows 2003 & 2008 operation systems. We have never used Arial Unicode MS for local...

Multithread debugging techniques

Hi, I was wondering if anyone knows of a nice survey of debugging techniques for multithreaded applications. Ideally, I'm looking for a case-based analysis: deadlocks, starvation, corrupted shared state, ... .Net specific, or generic. ...

How determine if application is web application

In a core assembly, which is run both in a windows service, and in a web application, I need to store information per user session. The service will have a single user session, and the web application uses HttpContext.Current. I want to configure which method to use within the core assembly - convention over configuration. I want to to ...