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 18

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

creating ExecuteQuery method
Posted by Andrus at 3/18/2008 11:22:10 PM
I need to create ExecuteQuery() method with signature: System.Collections.Generic.IEnumerable<TEntityt> ExecuteQuery<TEntity>(string selectCommand) selectCommand is sql SELECT statement like "SELECT Name, Id, City FROM Customers" This function should use Data Reader to get data fro...more >>

UnauthorizedAccessException
Posted by Beringer at 3/18/2008 10:13:01 PM
Hello, Until recently, I had been developing on an XP machine. Updated to Vista as the development environment and now when I try to access a file that I need to load I get an UnauthorizedAccessException Pardon, my ignorance but what is different in Vista security wise that would prevent...more >>

invoking the execution of a function on another thread
Posted by Jon at 3/18/2008 9:35:36 PM
Hi, "THREAD_UI" = thread under which the UI controls were created. "THREAD_XX" = another thread. "FUNC_UI" = function that needs to run on THREAD_UI. From THREAD_XX I need to start the execution of FUNC_UI, that needs to run on THREAD_UI. Inside FUNC_UI, I will modify many controls presen...more >>

C# and multimethods
Posted by Lee Crabtree at 3/18/2008 8:26:20 PM
I'm almost positive that this isn't possible in C#, unless there's something REALLY esoteric I haven't come across, but I was curious why something akin to multimethods in Lisp isn't possible in C#. Specializing function arguments by type is useful, but sometimes it would be really nice to be...more >>

Capture text sent to a printer to a file.
Posted by John Graves at 3/18/2008 8:17:01 PM
Does any one know how to caputer text data sent to a printer to a file. I have seen a window service that captures text data sent to a printer on the server and save it to a file. I would like to know how to do this. I have many reports that are produced on an IBM mainframe as text that I woul...more >>

Regex woes
Posted by Karch at 3/18/2008 6:47:11 PM
I have these two methods that are chewing up a ton of CPU time in my application. Does anyone have any suggestions on how to optimize them or rewrite them without Regex? The most time-consuming operation by a long-shot is the regex.Replace. Basically the only purpose of it is to remove spaces ...more >>

log4net mysteriously stops logging
Posted by RobinS at 3/18/2008 6:07:15 PM
I have sent a message to the apache listserver, but thought I would ask here, too, just in case anyone has seen this problem. I am using log4net to do logging in my .Net 2.0 application. I am using the most current version. It's been working great (AFAIK), but today a couple of the QA pe...more >>

Web Service Dataset to a Internal SQL Server
Posted by Carlos at 3/18/2008 5:50:06 PM
I have a web service that pass me a DataSet, I get all data correctly, I can even load it on a DataGridView, buyt I want to pass tha dataset to a Internal SQL Server, exact data structure , with no modification. What is the best wat you pass the Dataset to a table on the Internal SQL Server? ...more >>



Call external web service
Posted by John Straumann at 3/18/2008 3:36:09 PM
Hello all: I am working on a C# program and I need to invoke a method on an external web service. I have done many such method invocations from .NET web services where I am able to add the web reference to my project, but for this all I have is a WSDL and the URL for the external service. ...more >>

Simple example Please
Posted by AMP at 3/18/2008 3:19:31 PM
Hello, Can anyone point me to the code for a simple example of 2 classes and / or forms referencing each other using Fields or Get/set properties. I want both to be able to acces each others Properties and Functions. I want the correct way, so I learn the correct way. I know this is simple stuf...more >>

Best way to display real-time data in place?
Posted by phileo at 3/18/2008 3:16:37 PM
I have an application where I wish to display and update some text in place, eg: Status1 = val123 Status2 = val345 Status3 = val456 The valXXX is real-time data which needs to be periodically updated and re-displayed at the same location in the console (effectively overwriting the old v...more >>

Using ADO.NET in Windows Forms
Posted by sheperson@googlemail.com at 3/18/2008 3:09:43 PM
Hi, I have always had a problem when programming with ADO.NET and Windows Forms. It is about how to access database through WinForms. For example I have an application with several forms and each form deals with a part of the database. There are some options available: 1- I can create a datase...more >>

Regex password
Posted by Robert Bravery at 3/18/2008 2:51:05 PM
Hi all, Trying to validate a password with a regularexpressionvalidator But cant get the regex to work correctly I' look for a Alpha-numeric password of at least 7 in length and no upper limit in length Thanks Robert ...more >>

how to handle multiple-message-in-same data-buffer (async programming)
Posted by asharda@woh.rr.com at 3/18/2008 2:31:13 PM
Hello, I have written a sample async code (using callback/async). I am now seeing a situation where-in if two messages are received at the same-time, both of them show-up in the data-buffer. Given that i am new to this, can you point to resources or suggest ways to handle this scenario? (th...more >>

Problem with Reflection...
Posted by Christopher Van Kirk at 3/18/2008 2:14:09 PM
Hi all, I'm having some trouble reflecting the attached class. I have an IList<ICell<object>> collection of them. I get the first instance of ICell<object> in the list and call GetType() on it to get the concrete type of the implementation of ICell<object>, which is the class below...more >>

Confused about the lamda expression
Posted by gnewsgroup at 3/18/2008 2:13:17 PM
I want to get my hands dirty with Linq, so I watched a few videos from www.asp.net, and then turned to http://msdn2.microsoft.com/en-us/library/bb397687.aspx for some introduction about the new lamda feature of C#. In the article linked above, there is an example reproduced here: int[]...more >>

Assigning properties Values from one object to other
Posted by parez at 3/18/2008 1:56:18 PM
Hi I want to assign the values of properties of object A to objectB They both belong to different classes but implement on common interface. I just want to assign the properties defined in the interface. Will this work? ClassA a = new ClassA() classb b = new classB(); IMyinterfa...more >>

Need to traverse an object structure using Reflection
Posted by Chris Bordeman at 3/18/2008 12:05:57 PM
Hi all. I need to generically detect changes in any object from one point to the next. I can't modify the objects, nor can I use traditional serialization because the attributes aren't present and would be too slow anyway. My current approach is to recursively traverse a given object usin...more >>

ClickOnce updates and changing the prerequisite .Net Framework version
Posted by RobinS at 3/18/2008 11:58:05 AM
We are currently targeting .Net 2.0 and including it as a prerequisite. We want to upgrade to .Net 3.5 to use some of the new handy-dandy features. I changed the Target Framework to .Net 3.5 and changed the prerequisite to ..Net 3.5. When the user runs the application and it picks up th...more >>

serial port - again
Posted by tat at 3/18/2008 10:59:32 AM
Hi, I need to write an application which two computers can transmit data via serial port (COM1). So I wrote two simple test program write to comm and read from comm. However, when I test these two programs, I could not read any data from COM1. Data seems to send Ok but the receive program can...more >>

LINQ, Hashtables and Business Layer
Posted by Jake McCool at 3/18/2008 9:38:16 AM
Hello people, I have a performance query regarding LINQ that I would like some opinions. Currently we have a business logic framework that is used in n-tier applications. We read data from a database using a data reader and use this information to populate a set of business objects. Our ...more >>

3 explanations required - please help
Posted by almurph@altavista.com at 3/18/2008 9:23:06 AM
Hi everyone, I'm wondering can you help me understanding some C# syntax. 1. What does the this do? specifically the <string> thingy? List<string> keys = new List<string>(); 2. When you preceed a class with "[Serializable()]" - what does it mean/do?: [Serializable()] public ...more >>

Use of Array vs. BindingList vs Queue in data acquisition system
Posted by Eitan at 3/18/2008 9:05:01 AM
Hello, I have defined a real time data acquisition point as: public class DataAcqPoint { public byte DataSrc; public long TimeStamp; public float Value; } I would like to get some opinion of what would be the most efficient, fast way to store the data po...more >>

VB FreeFile() Function in C#?
Posted by zacks@construction-imaging.com at 3/18/2008 8:53:47 AM
Is there an equivalent in C#.NET for the VB.NET FreeFile() function?...more >>

c# features - revised!
Posted by Jarlaxle at 3/18/2008 8:20:01 AM
alright...one more try at this...at least it got people talking about it...This is just what I think would be good features...(which of course doesn't mean jack)...but I think it's good to discuss... 1. static extension methods I think they would be very useful. for instance adding other...more >>

Reading values from another form
Posted by Steve at 3/18/2008 6:59:21 AM
When you pull up a second form in your program, how do you get the values from the form? Form2 dataForm = new Form2(); dataForm.ShowDialog(); if (dataForm.DialogResult == DialogResult.OK) { // I want to get the textBox1 data f...more >>

computer languages
Posted by davidboon28@gmail.com at 3/18/2008 6:35:08 AM
http://comp-languages.blogspot.com http://computer-language-tutorials.blogspot.com...more >>

Finding a resource leak, is it the background thread or something else?
Posted by Cartoper at 3/18/2008 5:05:11 AM
My application appears to have a recourse leak. When the user starts a background process, the handle count in Process Explorer (PE) goes up by about 10, sometime 1 or 2 more, sometimes 1 or 2 less. When the task is completed, there are somewhere between 4 and 7 handles still open. My proce...more >>

Active Directory "login" from C# application
Posted by Benjamin de Waal at 3/18/2008 4:12:11 AM
Hi all, I am writing a program that needs to take a login name and password, and then try to authenticate against an AD server. Sounds simple enough so far... The name and password may be entered by a user (real human being), however it also may be generated by another application (actually, ...more >>

How to implement my array/collection
Posted by Maddy at 3/18/2008 2:35:18 AM
Hi, I have just migrated to C#. I need some advice on the following problem: I need to create an object/structure with characteristics A,B and C. A and B are Integers while C consists of 2 Integers. I need to store data in these, every 5 sec or so, each value with a DateTime stamp/ index. I wil...more >>

Linq and OrderBy
Posted by Ilyas at 3/18/2008 1:48:18 AM
Hi all I have the following code NorthwindDataContext nw = new NorthwindDataContext(); string orderByFieldName = "ProductName"; var data1 = (from p in nw.Products orderby orderByFieldName select p); This obviouslay doesnt work, what am I doing wrong. I...more >>

Application timeout
Posted by Cdude at 3/18/2008 12:50:29 AM
When i deploy my application i want to write to the registry to make the application last about a month.I want the application to check that date everytime it starts up then when the customer registers the software i want the application to run like normal.If there is a better way to do make a a...more >>

how to insert the exact date in database
Posted by Saimvp at 3/18/2008 12:41:00 AM
Hello to all. Please help me. I'm inserting a date into sqlserver 2005 using C#3. my problem is while insert is successfull my date and time. It's possible to insert only a date? -- To be Happy is To be Yourself...more >>

overriding controller event
Posted by alexia.bee@gmail.com at 3/18/2008 12:16:07 AM
Hi All, I've created a crontroller which has 3 text boxes. I set for all text boxes in this cotroller a key_press event. In my other app which uses this controller, I want to override the key_press event of the first text boxes in the controller. Is there a way to override an event of contr...more >>


DevelopmentNow Blog