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# > february 2006 > threads for thursday february 23

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

length of variable
Posted by gordon at 2/23/2006 11:54:24 PM
Hi I am writing a short app that will collect some information and produce a text file based on that information. One of the values that goes into this text box must be max of 8 characters long - otherwise it should be truncated to 8. I used a statement based on if the length is > 8 then ...more >>


Performance reading records with .Net 2.0
Posted by Hagen Rehr at 2/23/2006 11:00:18 PM
Hello Newsgroup, the following Code reads 60.000 records from an Access Datatable: static void Main(string[] args) { String connString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\test.mdb"; OleDbConnection conn = new OleDbConnection(connString); conn.Open(); OleDb...more >>

how to get the eventhandler list from an event?
Posted by i676373 NO[at]SPAM gmail.com at 2/23/2006 10:50:59 PM
Hi, I have a instance of Button, button1. button1.Click event is already associated with some unknown event handler, e.g. ======= button1.Click += new EventHandler(btn_click1); button1.Click += new EventHandler(btn_click2); How can I know the the list of eventhandler which is associated...more >>

Socket connection
Posted by Sharon at 2/23/2006 10:37:39 PM
Hi all. I'm trying first time async socket connection. In all the examples i've seen, the server connection is closed when the message is complete. Is it common to close the connection after every message? Also, the message is complete, meaning there is no more data to read, only when the clie...more >>

Exception: SerializationException
Posted by Brent Starkes at 2/23/2006 9:27:04 PM
Hi, I'm having a deserialization problem with a dll plug-in I'm writing, it serializes just fine but I'm getting an exception on the deserialization process. A first chance exception of type 'System.Runtime.Serialization.SerializationException' occurred in mscorlib.dll DeserializeTopH...more >>

Exception of type System.OutOfMemoryException was thrown.
Posted by Daniel at 2/23/2006 7:35:55 PM
Exception of type System.OutOfMemoryException was thrown. this error is occuring when on arbitrary threads in my .net windows service. There is 2 gigs of memory on the machine and this .net windows service only uses 50 megabytes. What could be causing this? how to fix? ...more >>

PDF not downloaded in IE 6, 7, but Firefox works OK.
Posted by Brent at 2/23/2006 6:23:17 PM
I'm trying to stream files back to the user's browser. Text and JPG files seem to work fine, but I get nothing -- actually, the missing photo icon with the red "X" -- when streaming PDF to Internet Explorer 6.x and 7 (beta). I'm hoping for some pointers with this code snippet: =============...more >>

How to have DateTime to start at midnight???
Posted by Jon S via DotNetMonster.com at 2/23/2006 6:15:05 PM
Hi all If the date and time on my computer is 23/02/06 15:43:20 and I do the following: DateTime dt; dt = DateTime.today(); The variable 'dt' has the value '23/02/06 15:43:20'. How can I make it so the time will always be 00:00:00. For example: 'dt' has the value '23/02/06 00:00:00' ...more >>



Windows Service utilizing ASP.NET technology
Posted by methodios at 2/23/2006 4:24:58 PM
Is there a way to create a windows service that can communicate with an ASP.NET page running IIS via HTTP protocol as the communicate medium? The service will act as a listener on whatever port and I would like that one ASPX file to do the processing. I would like to utilize the stuff that's alr...more >>

close cmd window when process.startinfo closes
Posted by David at 2/23/2006 4:15:28 PM
I'm opening a cmd window to run an ftp process. It's easy enough to close the process (.close()), but the cmd window won't close unless I go out to the window and type 'quit'. How can I send a request to the cmd window to close? Here's the code snippet that I'm using to make the call: s...more >>

Form.Invoke() got me down
Posted by Steve at 2/23/2006 4:12:44 PM
I need to update my UI from a Process or worker thread. I did some readinf and basically ended up adapting an MS example to fot my needs. It all made sense until I tried it :) My process makes calls to a Singleton logger class which in turn makes calls to a delegate to add items to a lis...more >>

using SoundPlayer with resource?
Posted by David Veeneman at 2/23/2006 3:00:20 PM
How do I configure a .NET 2.0 SoundPlayer object to play a WAV file embedded as a resource? I have tried the example in the MSDN documentation, and I am getting nowhere. Is there a simple example of how to do this, or can someone provide an example? Thanks. David Veeneman Foresight Syst...more >>

How to get relational data into an object?
Posted by deko at 2/23/2006 1:54:49 PM
Is there a Pattern or best Practice for getting relational data out of a database and into an object? The object in question has public properties that look like this: _stringName _ArrayList of cfgObjects _DateTime _Integer the cfgObject looks like this: ...more >>

string type
Posted by Alex K. at 2/23/2006 12:39:29 PM
Hi all I need a string type with only three possible values: let's say "A", "B", "C". In other words, I need something like enum but of string type: enum MyStrings { sA = "A", sB = "B", sC = "C" } .... MyStrings x; ... switch(x) { case MyStr...more >>

Extend a Predefined Enum
Posted by Coder at 2/23/2006 11:53:14 AM
Hi, Running into an issue. I am creating a base class. This base class has a "State" property of type "States" which is a locally defined enum type. The issue is this...the derived class apparently can't add to the "States" enum. In other words, if the derived class wanted to define anot...more >>

Instance a class at runtime
Posted by Ernesto Díaz at 2/23/2006 11:52:01 AM
Hi I need to instance a class at runtime, at runtime I can get the name in a string, i would like to know if its possible to instance the class at runtime with the name in a string. Thanks for your assistance. Ernesto Díaz ...more >>

DeflateStream & MemoryStream?
Posted by Asaf at 2/23/2006 11:51:28 AM
Hi, I am trying to Compress & Decompress a DataSet. When running this code I am receiving the error: System.Xml.XmlException was unhandled Message="Root element is missing." Source="System.Xml" The code: DataSet dsDataOrginal = new DataSet(); DataSet dsDataAfterDecomp...more >>

Raising multiple events?
Posted by Ben R. at 2/23/2006 11:43:08 AM
Hi there. I'm referring to http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconraisingmultipleevents.asp The article implies that rather than having one field backing each event that your class has, you can use this alternate method if you have many fields in...more >>

Converting DOS date to mmddyyyy format in C#
Posted by spdude at 2/23/2006 11:13:46 AM
I am working on an application that stores date in DOS format. For ex: 9540 which appears to be the number of days since 1980. Anyone knows a way to convert this into the mmddyyyy format? Thanks in advance. ...more >>

How can I send e-mails?
Posted by Doru Roman at 2/23/2006 10:50:29 AM
Hi, How can an e-mail be send from a window application and from a web-based one? Is there a control that I can use, eventually from the Tool Box? Thanks, Doru ...more >>

Messages displayed to user.
Posted by UJ at 2/23/2006 10:24:24 AM
What do people do when they have to display messages to user and want to put them in some kind of scrolling window? Do you use a text box or is there some better way. TIA - Jeff. ...more >>

Setting a default button?
Posted by Brett Romero at 2/23/2006 10:15:29 AM
Is there a way to set a button that will execute if the user hits <enter>? Thanks, Brett ...more >>

RUnning a console program hidden?
Posted by UJ at 2/23/2006 10:09:15 AM
You can have a windows form not show in the taskbar. Can you do the same with a console program? TIA - Jeff. ...more >>

HTML Parser
Posted by SEGACO at 2/23/2006 9:38:30 AM
Hi, Can someone tell me if C# includes something to parse HTML? Thanks....more >>

Passing a variable to a new thread?
Posted by Raith at 2/23/2006 9:09:55 AM
Ok I'm still very new to C# and I've been searching around and getting myself all confused so gave up and am posting here. Vastly simplified but I have a form with some tick boxes on it, clicking on ok populates an array with the values selected and runs a process passing the array, a bit like...more >>

WebRequest times out...but only 3rd time and on...
Posted by Tim Cowan at 2/23/2006 9:00:19 AM
Hi, I put this code in a windows forms app for testing. The IP values are both correct. It works the first time, the second time but at the third time it fails with timeout... I have it running here AND in a service with a 30 minute interval. 1. Am I doing this correclty? Is there a bett...more >>

Calling a webservice from a client using a proxy
Posted by KrippZ NO[at]SPAM gmail.com at 2/23/2006 8:29:40 AM
Hello ! I need some help with making my client app use a proxied connection. I've set the "Proxy" property of my web referance in the following way web.Proxy = new System.Net.WebProxy(proxyAdress, proxyPort); is this enought or do I need to be thinking of other stuff like the "Credential" p...more >>

Adding a program to the startup group programatically.
Posted by UJ at 2/23/2006 8:25:06 AM
How can I add a program to the startup group for all users programmatically? TIA - J. ...more >>

Display Publish Version Error
Posted by Mike L at 2/23/2006 8:04:32 AM
Error occurs on "System.Deployment.Application.ApplicationDeployment.CurrentDeployment" ** Here is my code private void frmMain_Load(object sender, System.EventArgs e) { System.Deployment.Application.ApplicationDeployment ad = System.Deploy...more >>

HOWTO: Print HTML page using WebResponse
Posted by Dan Sikorsky at 2/23/2006 7:46:10 AM
I've loaded a string variable with html from a web page URL captured using WebRequest and WebResponse. How can I send this html to the printer? ...more >>

start progress bar automatically
Posted by KenLee at 2/23/2006 7:28:27 AM
I worked on Windows application. I made a application to covert flat file to insert database. currently, I made a button to display progress bar after clicking the button. I just want to load automatically after clicking application.exe file without clicking the button on the form loaded. ...more >>

revision algorithms
Posted by herc at 2/23/2006 7:18:56 AM
I am looking for an algorithm to implement a revision system. The data is quite simple. There is a array of objects. New objects can be added, objects can be deleted, and objects can be moved around in the array. I am looking for an efficient way to look at two versions of this list, captu...more >>

Regular Expression Help
Posted by Mike Collins at 2/23/2006 6:59:28 AM
I've been looking at regular expression examples and can't seem to find what I am looking to do. Is there a regular expression that can test the following? 1. Contain at least 1 lowercase letter. 2. Contain at least 1 uppercase letter. 3. Contain at least 1 number 4. Contain at least 1 speci...more >>

EventID and EventSource Problems
Posted by Wellingotn Rampazo at 2/23/2006 6:31:41 AM
Hi guys, I have an application that handle errors and log it at windows event log. When we are logging events, we are changing the application source to use our custom source (ex: MyApp) or maintaing "Application" source. And to do it, we have to write a project installer that registers ...more >>

Windows service interaction with WinForms app?
Posted by deko at 2/23/2006 3:52:13 AM
When to use a privileged user thread rather than a windows service? That's the question raised in a previous post [Make a Windows Service start a windows program]. It was suggested that if the service needs to interact with a WinForms app (which is the UI used to adjust the actions taken by,...more >>

C# pure xml database?
Posted by BA at 2/23/2006 3:21:49 AM
Hello, Anyone know of an open source C# pure xml database that is available? I've done some looking around and can't locate anything. Thanks in advance, BA http://biztalkia.blogspot.com/ ...more >>

sub-array references?
Posted by Kresimir Spes at 2/23/2006 3:01:03 AM
Is the following C code possibile in C# (without the pointers ofcourse) int a[1000]; int* b=&a[100]; // or a+100 b[0]=0; what I would like to do is create a new int[] array object and have it point at the beginning of the 100th element of array "a" and set its size to 100 elements, so ...more >>

foreach Iterator - which is more efficient?
Posted by Anthony Bouch at 2/23/2006 1:34:57 AM
Everything I know about looping structures says to be careful about expressions that need to be evaluated again and again for each test/increment of a loop. I came across this piece of code the other day and stopped to think for a minute about whether it was right or not. foreach (XmlNode ...more >>

reflection, access the field of object dynamically
Posted by tienhuat NO[at]SPAM gmail.com at 2/23/2006 1:19:18 AM
Hi, Let say I have an instance of class, eg. ArrayList. And assume that I don't what properties are inside this instance/class. As I know I can use Reflection to get the properties. Now, assume that I got the properties programmatically, let them be Count and Capacity. How can I access t...more >>

any programmers in the house please??? what do you do ???
Posted by drgonzo120 at 2/23/2006 1:14:48 AM
hello, i'm studying csharp in belgium, and i'll have to do a "stage" , go work for a few months in a company, and then, hopefulmy, get a job, but now, i wonder, in what directions is csharp used, so, i wanted to ask all the csharp programmers here: can you please reply exactely what you do ...more >>

How to serialize interface???
Posted by Mirek Endys at 2/23/2006 12:00:00 AM
What is the best way to serialize object, that contains data in interfaces. Simple. I have instance of my object, that contains data in interfaces. What is the best way to XMLSerialize and deserialize this object? Thanks. ...more >>

Reading Registry Values in Windows NT Service
Posted by Ahmad Jalil Qarshi at 2/23/2006 12:00:00 AM
Hi! I am developing an application in C# as a windows NT Service. This application needs to check for eventlog using EventLog.Exists("System") But unfortunately it generates exception "Requested registry access is not allowed." After that I tried to verify it using registry RegistryK...more >>

Choosing a customized RootFolder in a FolderBrowserDialog
Posted by antuantuan at 2/23/2006 12:00:00 AM
Hi. How can I initialize a FolderBrowserDialog choosing a particular RootFolder? I saw that FolderBrowserDialog has a RootFolder member, but it accepts only an Environment.SpecialFolder (but I don't want to choose a SpecialFolder for my FolderBrowserDialog). I hope I've been clear. Thank...more >>

how to make dropdown list flat in asp.net
Posted by AbdulGafoor GK at 2/23/2006 12:00:00 AM
thanks...more >>

Ambiguous Overloads
Posted by John B at 2/23/2006 12:00:00 AM
Hi all, If I have the following methods: public void foo(object o) { } public void foo(string s) { } public void foo(array a) { } And I call: foo(null); I should (and do) get an ambiguous call error. But if I comment out the foo(string) or foo(array) then I do not get th...more >>

Usercontrol databinding on property Text
Posted by Tsair at 2/23/2006 12:00:00 AM
[System.ComponentModel.Bindable(true), Browsable(true), Category("Behavior"), Description("Text displayed")] public override string Text { get { return this.textBox.Text; } set { this.textBox.Text = value; } } I change the usercontrol TextBox value from original data v...more >>

passing by ref for value type and storing this in a member...
Posted by Dave Parry at 2/23/2006 12:00:00 AM
Hi, I would like to hear peoples thoughts on passing a value type by reference and then trying to store this ref in a member so it can be updated elsewhere, whereby I want the referenced value to be updated. eg. class A { bool refval; A(ref bool val) { refval ...more >>


DevelopmentNow Blog