.net

C# - Arguments for application

How can I make it so when there are arguments added to the end of the program name it does a specific method or whatever? Also, is there a name for this? Example: program.exe /i I've also seen %1 ...

Generating ADO.NET Entity Data Model files, where to start?

Our product is partially built using Delphi and partially .NET and in our current state of migration to .NET, we have the data dictionary in a Delphi component, so this is the master. From this we generate .NET source code through templating, to support simple querying but also to do Linq2Sql, since our product requires SQL Server. How...

What is the Applet replacement in .Net

What is the Applet replacement in .Net. If i would need to change the Stock Ticker Applet to a .Net version, What technlogy should i suggest??? Thanks ...

How to end process after closing whole application in C#.NET ?

I have a .NET 2005 (C#) desktop application, in which there is a login form and an MDI form, which then have multiple subforms. All other forms are opened in MDI form only. After a user logs in, I hide the login form and then show the MDI form, but when I close the MDI form, my application process does not end because the login form is...

Asynchrony and .NET events?

I'm really embarrassed to ask such a trivial question but debugging some software now convinced me I don't really understand this issue: How does .NET events work seen from an altitude of 20,000 feet? I don't mean the delegate/event handler pattern and all this. What I mean is - what's the BIG picture: Code A is doing something. Some ...

Is Team System a solution?

I am working on a web portal in ASP.NET (VS2008) with my 2 friends. We want to code, debug, test our webportal on different machines simultaneously. How it can be done? Is VS2008 Team System a solution for this? ...

Programmatically inspect .NET code

I am looking for a way to programmatically inspect a .NET (C#, VB.NET,..) source code to perform static code analysis. I'd like to perform queries on the code such as: - list classes whose name begin by x - list all the subclasses of x - list methods which instanciate an object of class x - determine if method x contains a variable name...

how to implement undo operation in datagridview

Hi, I have created one application in c#.net.Using this application we can update datagridview,now i need to implement undo in it plz give me some ideas. private void button29_Click(object sender, EventArgs e) { Datatable dt; dt.RejectChanges(); } using above code i can do undo before updating. but i...

Microsoft CCI based Obfuscator

Hi, I want to write an .NET obfuscator based on Microsoft CCI library. I found a few obfuscators written with Mono.Cecil, but there are no CCI based. Are there any potential problems with CCI for this task? Thanks in advance. ...

Visual Studio does not break at exceptions in Form_Load Event

I recently updated my laptop from Vista 32bit with Visual Studio 2005/2008 installed to Windows 7 x64 with only Visual Studio 2008 installed. So I don't know if this is a "Windows 7" issue or just a configuration within visual studio. My problem is that exeptions in the Form_Load() event get swallowed without notifing me, which makes i...

Simple firewall in .net

Hi, I want to try create a simple firewall which restricts applications from accessing the internet except for applications I allow. Like netlimiter. So it would have to allow internet access for applications that are white listed and drop the connections for the rest. Is this possible with c# or vb.net? If it is possible can you please...

Test upload complete to FTP server

Hi people! I'm trying to do an application that warns me when a user finishes uploading a file to my FTP server. What I want is: when a user completes its transfer to my FTP server, I want that my application warn me. How can I do that? In C#.NET… Thanks. Best regards. ...

one vs two vs three dimensional array, why the speed difference?

when I run this code Enum l NormalFor NormalForEach End Enum Sub Main() run(l.NormalFor) run(l.NormalForEach) Console.Read() End Sub Sub run(ByVal l As l) Dim one(999999) As Integer Dim two(999, 999) As Integer Dim three(99, 99, 99) As Integer Dim r As Random Dim sw As Stopwatch r = New Ra...

C#: How to create a thread-safe single instance of an IDisposable?

There is this DB-connection-like object that my web application will need. It is pretty slow to create and will be used rarely, so I would like to keep only a single instance of it around. If several requests need it at the same time, they will lock() the object and serialize their access. To make things more fun the object is an IDispo...

Does NHibernate interoperate with Hibernate? If not is there a framework out there for both Java and .NET?

Say you had: a database a bunch of .NET Windows GUI programs a bunch of Java web applications you could use Hibernate for the Java stuff and NHibernate for the .NET stuff - but would the two actually interoperate or would they be entirely different stacks? If not then is there a persistence framework out there that lets Java and .NE...

Get the previous page name in asp.net

Hi, lets say that i have 3 pages, (origin1.aspx)/(origin2.aspx)/(destination.aspx), and i have a control which represents back button, its functionality is to get from which page it has been called. and once clicked redirects back to the original caller page, i have searched the web, and found many great and simple ideas, such as querySt...

Priority Queue in .Net

This question is similar, but i want to exactly know: Is there any class/struct/... in .Net for priority queue? Just like in STL that have priority_queue for this. It accepts a comparsion function to support customized sorts. The best thing i found in .Net is SortedList< Key, Value > that sorts it's values by Key. So one solution is ...

Generating documents in multiple applications

I need to create an application that generates a bunch of templates for Office (2000), OpenOffice.org (2.0) and InDesign. The design of the templates will be made in each application but we need a system for placeholders so that my application opens a template, replaces the placeholder with some text (like a name, address, phone number) ...

.NET component in DELPHI 2009

Hi, Could you please tell me if .NET component can be used with Delphi 2009 and, if so, could you please send me some example code. Thanks in advance. ...

MaskedTextProvider class behaves differently from MaskedTextBox. Why?

I have a requirement whereby I have to implement the masking provided by MaskedTextBox, but without using that UI component in the business layer or say for doing CLR integration in SQL Server 2005 (so that I can implement a db function that invokes my C# method). However there is some anomaly between the behavior of the MaskedTextBox ...