Archived Months
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008
all groups > c# > march 2008 > threads for tuesday march 11

Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

Controler
Posted by Tony Johansson at 3/11/2008 8:49:07 PM
Hello! I have a checkedListBox in the Form and have noticed that if I want to check a checkbox for one row in the checkedListBox I have to do it in two steps. First click on the selected row and then check the checkbox for the selected row. I just wonder if it's possible to do this in one ...more >>


How to generate LINQ classes from database
Posted by Siegfried Heintze at 3/11/2008 7:22:01 PM
I'm watching Luca on http://www.microsoft.com/emea/msdn/spotlight/sessionh.aspx?videoid=716 and I lost him between the time he dragged and dropped the northwind classes customer, order, supplier and product on to the DataClasses1.dbml and then started using the actual classes in his demo pro...more >>

Solution getting too big to handle
Posted by Gaz at 3/11/2008 6:08:25 PM
I'm trying to write this client/server card room. I've been working on it all on my tod in my bedsit using VS C# Express 2008. The solution has grown to include multiple libraries and projects. It uses the command pattern. A client sends the server commands like "TABLE#3 SITDOWN" and the se...more >>

FindWindow...next?
Posted by pipo at 3/11/2008 6:05:18 PM
Hi, When I call FindWindow("SciCalc", null) I always get the same handle back. How can I enumerate through the (open) calculator forms? I dont want to use EnumWindows and check for the handles (bit overdone I think) More looking for a FindWindowNext or so ;) Does anyone know a function ...more >>

Casting
Posted by Analizer1 at 3/11/2008 5:39:07 PM
Hi, I have 3 or so windows they have 6 chkboxes , These Checkboxes Represent The Serial Port Signals, CD,CTS,DSR,DTR,RTC,RI I dont want to write the same code , in 3 or 4 or more places .. ; public static class SampleClass { public static void UpdateControls(Control oControl) {...more >>

Canceling out of a delegate or IComparable
Posted by superjodash@gmail.com at 3/11/2008 5:24:38 PM
Hi, I am sorting a large List<FileInfo> using Sort(new MyComparable()). In other areas, I'm using an anonymous delegate on a List<>.FindAll(...). My question is this: How do you cancel out of these scenarios? For instance, Sort calls the following public class MyComparable() : IComparer<F...more >>

Node in XML
Posted by Peter Morris at 3/11/2008 5:20:37 PM
I have loaded the following XML into an XmlDocument <email> <subject>Hello</subject> <body>Hello</body> </email> How do I get the values of both subject and body? Ta Pete ...more >>

Need help with C# code
Posted by Durango2008 at 3/11/2008 5:16:55 PM
Hi, I have a form which contains a table(Table1), within that table I have label with an ID set to "1A". Using something like: if(Table1.FindControl("1B") != null) { labelID = "1C"; } else if(Table1.FindControl("1A") != null) { labelID = "1B"; } Label lblType = new Label(); ...more >>



How to launch an app with double-click on filename
Posted by Dick Swager at 3/11/2008 5:15:17 PM
I have an Windows Form application that has child Forms in it. I have a constructor in the main form that takes a filename as an argument an creates a child form from the data in the file. If I launch the app from the command prompt with a filename as an argument, it works fine. But if I ...more >>

First message sent is lost (TCP)
Posted by WP at 3/11/2008 5:05:32 PM
Hello, I'm very new at C# and I'm writing a simple card game where two players can play a simple card game against each other. Communication is done through a server. I'm using the TcpClient class and I'm trying to do asynchronous reads using TcpClient.GetStream().BeginRead(). Anyway, my prob...more >>

Retrieving items from a List<t>
Posted by John at 3/11/2008 4:52:14 PM
Does anyone know how to retrieve the items from a List<T> once you put the items in the list? I have the following code Lasse, Actually that is what I was going to do until the other option were laid out on the table for me. I am trying to use list right now. I have run into a few issu...more >>

Max length of code snippet?
Posted by Clive Dixon at 3/11/2008 4:22:23 PM
Is there a maximum length for a code snippet? I have created quite a long one (> 170 lines), which when I use it to generate code, it only generates around the first 170 lines of the snippet. ...more >>

Upgraded to Visual C# Express 2005 SP1, can no longer persist data in SQL Server Express
Posted by hardieca@hotmail.com at 3/11/2008 3:29:27 PM
Hi, After upgrading C# Express 2005, none of my apps will persist data to SQL Server Express (have not yet applied the Service Pack...downloading now). While the application is running, I can access the data I have tried to save in the database, but as soon as I stop and restart the applic...more >>

bitmap bands
Posted by Analizer1 at 3/11/2008 3:25:19 PM
Hello, I have a BitMap band i created 32x31, 24x24 and 16x16 how can i extract the portion (single bitmap pict) that i want to use thanks ...more >>

How to tell if an object inherits an interface
Posted by Ron at 3/11/2008 2:34:33 PM
I have a situation where I need to test if a Control implements from a specific Interface to avoid an invalid cast exception: foreach (Control ctrl in this.Controls) { // Need to test to see if ctrl inherits interface ICustomControl here ICustomControl control = (ICustomControl)ctrl; ...more >>

Updating the form's fields
Posted by Vanessa at 3/11/2008 2:02:01 PM
Hi All! I am with a situation where I am not getting the right updating to the form's fields. The situation is the following one: I have one combobox and one textbox. I am using the CurrentChanged event of the BindingSource of the combobox to update the textbox. When selecting an item in...more >>

generics and reflection
Posted by parez at 3/11/2008 1:58:25 PM
Hi One of the property of returnedObject is of the type List<MyClass> (in just one instance) in some other case it could be List<MyClass2> I want to check if a particular propert is a generic list. If it is, then do something with the type of the the class (MyClass and MyClass2) ...more >>

String to fixed buffer (and vice versa)
Posted by LPeter at 3/11/2008 1:30:02 PM
Hi, I would copy the characters of a string variable to a fixed character buffer in a struct (and vice versa) in C#. public struct S { ... public fixed char cBuff[16]; ... } I tried to do this many way, but I often get the following compiler error: "error CS1666: You canno...more >>

string or String?
Posted by Bogdan at 3/11/2008 1:17:23 PM
As a mainly C/C++ and Java developer I was quite surprised when I realized that C# compiler takes both "string" and "String" types. C# is case sensitive so I'm a bit puzzled by that. Could someone please explain that or point me to on-line docs? thx ...more >>

How to make common connection string for diff program?
Posted by Manish at 3/11/2008 11:42:45 AM
Hi i have a problem where as i want to use two different C# net program in a single system where i have used 2 different sql server name. when i execute those program each time iam renaming the sql server name and executing the programs. Is there any way where i can write a connection string wi...more >>

xml serialization questions
Posted by Jarlaxle at 3/11/2008 10:48:00 AM
I have an xml serialization question i was hoping someone would know. If you have a class member that is an array... [XmlArrayItem("Number")] public List<int> MyNumbers { get {...} set {...} } this will get serialized as... <MyNumbers> <Number>1</Number> <Number>2</N...more >>

Bizarre benchmark result -- C# hundreds of times slower than Java?
Posted by Michael A. Covington at 3/11/2008 10:21:02 AM
While asking some Java enthusiasts what they think about C#, I came across this: http://www.manageability.org/blog/archive/20030520%23p_the_problem_with_cameron Reportedly, the (essentially) same program in C# is much, much slower than in Java. This is a program that is heavy on regexes...more >>

Iterate and List Members of an NT Group with LDAP
Posted by John Wright at 3/11/2008 10:17:53 AM
I posted this in VB without a response and in ADSI with no response. C# code is fine, if someone could help it would be much appreciated. I can get a list of Groups from my Active Directory, now I want to get a list of all members of a group. Does anyone have code or can point me in the dir...more >>

Looping through an array
Posted by John at 3/11/2008 9:36:00 AM
I have an array with 5 items, when I retrieve the 5 items I need to add (+1) one more item to the array to recreate it to make a new array = 6. But as I am looping through the array the program will crash because number 6 in the array does not exist. How can I loop through the array for the ...more >>

validating dates and times
Posted by raulavi at 3/11/2008 9:35:02 AM
Hi: (I know there are lots of different ways to do it) no regex, please if we have string date yyMMdd "080230" whats the best way to test for valid date ? Feb will never have 30 days, 2) if we have string HHmm "3490" whats the best way to test for valid time? (worng hours wrong minu...more >>

Trying to split an array on a tab
Posted by AMP at 3/11/2008 9:32:29 AM
Hello, I am trying to split an Array into another array. Each value in the array has tab delimited strings. I am getting: Cannot implicitly convert type 'string[]' to 'string' I am trying this: string[] lineSeparators = new String[]{"\r\n"}; string[] Channel = FileName.Split(lineSeparato...more >>

Saving user settings in winforms C#
Posted by parez at 3/11/2008 9:05:46 AM
Whats the best way of storing user settings and application settings in a winforms application? Should i create my own xml files and save it in Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) ? What about the Settings class.? There were examples in vb.net which lets a ...more >>

C# app with COM Interface for array of COM structs
Posted by Sharon at 3/11/2008 9:04:04 AM
Hello Experts I'm exporting COM interface from within my C# application (VS2005 .NET 2.0). One of my exported function GetROI() return type is a struct defined in a native COM object. The method signature is (viewed by the OLE View): [id(0x60020001)] HRESULT GetROI( [in] lo...more >>

Whats difference between stack and heap in C#?
Posted by COHENMARVIN@lycos.com at 3/11/2008 8:59:44 AM
I'm reading that the stack is where 'value' types are created, and the heap is where reference objects are allocated but I'm wondering if these are just 2 arbitrary sections of memory, or there is more to it. Also on a somewhat related topic, in C++ I've read that a DLL is in a separate section ...more >>

ClickOnce Help
Posted by Peter Carlson at 3/11/2008 8:55:49 AM
Not sure if this is the right NG, if not please point me in the right direction. We are developing a clickonce installer for our program Here are my basic questions: 1. How can I really debug this? Simply pressing F5 in VS2005, doesn't really provide the same environment...for example ...more >>

Edit app.config at runtime.
Posted by bede at 3/11/2008 8:51:05 AM
I need to be able to read the contents of my app.config file into a datagrid and allow the nodes to be edited and saved in the config file but for the life of me cannot figure it out. I know I have to work with System.Configuration.ConfigurationManager but thats about it. Any ideas ?? ...more >>

Exceptions
Posted by csharpula csharp at 3/11/2008 8:50:36 AM
Hello I got the following scenario: Getting exception from some code unit : catch (System.Exception ex) { throw new Exception("unable to load file project" , ex); } This exception is being catched in the upper unit which called this code : ...more >>

finding the last entered identity
Posted by Robert Smith at 3/11/2008 8:01:03 AM
Hi, I was wondering if there was a way to find the last entered identitykey after doing an updatedataset. I have this.sysFeedsDS.SysFeeds.AddSysFeedsRow(this.feedName, "", this.sourceId, true); this.systemConfig.UpdateSysFeedsDataSet(this.sysFeedsDS); SysFeeds is the datase...more >>

Talking to an FTP server --- please help!
Posted by almurph@altavista.com at 3/11/2008 7:33:58 AM
Hi everyone, Can you help me please? I am trying to login into to an FTP server. I can successfully reach the server and it sends me a welcome message but after that I don't know how to send down the username, password etc...It identifies itself as: "Pure-FTPd" Is there any way I can fi...more >>

Simple String split
Posted by AMP at 3/11/2008 6:14:12 AM
Hello, I am trying to split a string at the newline and this doesnt work: String[] Channel = FileName.Split("\r"); What am I doing wrong? Thanks Mike...more >>

C# API
Posted by Manjree Garg at 3/11/2008 4:41:01 AM
Hi, I am new to C#. I need to know hoe to write C# API. If somebody can point in right direction ; where to look at e.g. some link and example etc. that will be great. Cheers. Manj....more >>

Typed Datasets
Posted by Robert Smith at 3/11/2008 2:57:02 AM
Hi, I have a problem whereby I have one form dealing with one of two typed datasets with almost all the same column names except two, depenind on which option the user selects. at the moment I have if statements like the following that set the value of form fields etc, depeninding o...more >>

SerialPort.Open() Exception
Posted by Christian Havel at 3/11/2008 2:25:02 AM
Hi, I have a problem calling serialPort.Open(). The customer receives a message like: Die Anwendung hat einen Vorgang versucht, der von der Sicherheitsrichtlinie nicht zugelassen ist ... ....verwenden Sie das Microsoft .NET Framework-Konfigurationstool. Fehler bei der Anforderung des ...more >>

Dynamic forms
Posted by AA2e72E at 3/11/2008 2:24:00 AM
Given a C# form (and its controls) that is created dynamically i.e. programatically rather than using the IDE, is there a way of writing that form's definition to a .CS file? ...more >>

Delete Driver with C#
Posted by Uwe Porsch at 3/11/2008 2:13:01 AM
Hello, I want to write a smal application which deletes a driver installed on Vista. Right now I delete a driver manually within the Hardware Manager. I want to do this with an app. Thanks and regards Uwe...more >>

I need an insight into 'Static'
Posted by AA2e72E at 3/11/2008 1:35:02 AM
I am trying to understand why this works ... using (Process ProcRegEdit = Process .Start("REGEDIT.EXE", "/s C:\\Ajay\\VS2005\\C#\\REGISTRY\\ajay.reg")) { ProcRegEdit.WaitForExit(); // Wait indefinitely if (ProcRegEdit.HasExited) { ProcRegEdit.Close(); ...more >>

.net c# console glitch
Posted by bhagyamesh@gmail.com at 3/11/2008 12:56:57 AM
dear sir/madam, AS I START TO DEBUG ANY PROGRAM IN C# CONSOLE, PC GETS RESTART. PLZ HELP ME OUT. Thanks in Advance....more >>

web development
Posted by webster.fastian@gmail.com at 3/11/2008 12:56:42 AM
developing a website just like www.alibaba.com. can any one please help me out and explain what are the essential requirements? where do i start? what are the platform requirements? very important. what are the platform requirements for ensuring safety? starting from scratch....help needed!...more >>


DevelopmentNow Blog