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 2007 > threads for wednesday march 28

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

What Impact Do Static HashTables and Classes have on the CPU?
Posted by Mark S. at 3/28/2007 11:45:44 PM
Hello, I've written a high performance web app with C# and it completely relies on static hash tables (using sync) and classes. Under real world stress this app is handling 5 get requests per CPU per second. I've gone from a single-core/single-proc, to a dual-core/single-proc to a dual-c...more >>

BindingSource determine changes before calling EndEdit()
Posted by Rob Dob at 3/28/2007 10:53:28 PM
How do I determine if there are any rows within the BindingSource that have changed prior to calling the EndEdit(). I need to do this in order to archive some records and if I call the EndEdit() then it also wipes out the orginal version of the dataset record with the proposed changes., Howe...more >>

a splash screen in my windows application using c#.
Posted by Sanjay at 3/28/2007 9:48:02 PM
i wanna develop a splash screen in my windows application using c#.While splash sreen appears at background application componets should gets loaded as soon as component or dependencies gets loaded the splash screen should get closed permanantly and the main form should appear. Pls help me...more >>

Regular Expression for currency
Posted by hellbent4u NO[at]SPAM gmail.com at 3/28/2007 8:43:13 PM
Hi All, I need a regular expression to be used in an ASP page which would allow a user to enter: 1000 as well as 1,000 i.e. an amount without comma as well as with comma(for example 10,000 or 100,000 etc.) If anyone's aware, please let me know. I am in urgent need to use it. Thanks...more >>

How to get a DateTimePicker accept and show empty date (emty string/space/null)?
Posted by Claes Wedin at 3/28/2007 8:20:45 PM
My customer needs a DateTimePicker in VS2005 C# that can show emty date values (blank/space/null). I need a control that: 1. Can show a blank value 2. Detete a date when hitting the delete and/or back key 3. Allowse the user to enter yyyy-MM-dd date format manually 4. When tabbed into the...more >>

Literals and strings - make it stop!!
Posted by RobinS at 3/28/2007 8:13:54 PM
This is probably a stupid question. I'm new to C#, and I am having a string problem. I am storing strings in an XML file. Example, a connection string: DataSource="servername/sqlservername";InitialCatalog="nameofdatabase"; IntegratedSecurity=true; When I load this from the XML file, a...more >>

How can I speed up ToString of decimal and double?
Posted by ThunderMusic at 3/28/2007 7:58:42 PM
Hi, We have a part of our application that deals with millions of records and do some processing of them. We've achieved a pretty good performance gain by developping a custom DateTime.ToString and a custom int.ToString, but we can't find any clue on doing for decimal and double, which would ...more >>

Ways to set Second to zero in a DateTime?
Posted by Jen at 3/28/2007 7:57:38 PM
So I have the need to take UtcNow and change the Second to zero. Just wondering how many ways there are to do that? ...more >>



FindReplaceDialog?
Posted by swje at 3/28/2007 7:28:03 PM
Hi, Is there anything like C++ CFindReplaceDialog in C#. Thanks swje - 3/29/07...more >>

Web Service Write Files to Network Drive
Posted by Sean at 3/28/2007 6:30:08 PM
Here is the secenario: I create a web service to read in xml string and then save it to a network drive, say : \\fileserver\xml\ I also have a windows application to call this web service. Now the problem is: If I run this web service with VS2005 built-in web server, it has no problem at all...more >>

XmlTextReader - Confusion
Posted by JimHeavey at 3/28/2007 6:18:02 PM
Working with my first XML file and the first time I have used the XmlTextReader class. Reading a book on this subject, I have constructed code which I thought would navigate thru the file and retrieve the values for each of the "nodes". Running the debugger, I can see that I am navigating ...more >>

Batch file processing with C#
Posted by Gaurav at 3/28/2007 4:22:01 PM
Hi, I have a requirement to execute a .bat file from c#. I am aware of the process to do so using System.Diagnostics namespace. However, I need to replace the values in my .bat file at runtime when it is called by C#. eg. In my .bat file "C:\test.bat" -xml "C:\07.xml" -xsl "C:\fo.xsl" "c:...more >>

Resize image in asp.net
Posted by Tomo at 3/28/2007 4:01:37 PM
I have some code for resizing image (create thumbnail) but there is no compression. Thumbnail image is smaller in pixels, but in kilobytes is bigger. How can I create smaller file? I need code in VB or C#. // Get the path of the original Image string displayedImg = Server.MapPath("~") + "/...more >>

asp.net treeview and rendercontrol
Posted by GroupReader at 3/28/2007 3:51:05 PM
When doing a "callback" I normally call a webControl's RenderControl method to get the html for that WebControl. This has always worked great in the past, but it does not seem to work with an asp:treeview control. When I call MyTreeView.RenderControl, the html that I get is not what I expec...more >>

Pessimistic locking
Posted by DaveP at 3/28/2007 3:39:54 PM
How do i do Pessimistic locking in ado.net with c# Thanks DaveP ...more >>

Generated code for DataGridView and Update
Posted by Lubomir at 3/28/2007 3:04:00 PM
Hi, I have a DataGridView that displays data from one table from database. I didn’t implement any my code, I just used wizard to do all the work with DatagridView populating. Visual Studio generated strong typed dataset and binding. And here is my problem. I try to update the database...more >>

How do I create partial class to be nested under the main class file?
Posted by Joseph Geretz at 3/28/2007 2:41:27 PM
When I create a Form, the VB IDE creates the following files in the following hierarchy: Form1.cs Form1.Designer.cs Form1.resx Both Form1.cs and Form1.Designer.cs are partial implementations of a single physical class definition. The VB IDE properly recognizes Form1.cs as a Form ...more >>

Textbox's KeyUp Event
Posted by Johnny E. Jensen at 3/28/2007 1:49:43 PM
Hello I have a textbox where i check for a "return" or "enter" keystroke for that i use the txtBox KeyUp and checks the e.KeyCode value. But when i do stroke the return or enter kay, a sound (ping) sounded. How can i prevent that ping? Kind regards Johnny Jensen ...more >>

Configuration Manager
Posted by Jack Jiang at 3/28/2007 1:42:36 PM
I am trying to read a config file of a dll, but when I use ConfigurationManager.AppSettings["key"] It refer to the application.exe.config file that I am running. Any one know how do I force it to read the dll config file instead of the application config file. I look into ConfigurationManager...more >>

CS0564
Posted by PGP at 3/28/2007 1:41:03 PM
This error has the following description - "Overloaded shift operator must have the type of the first operand be the containing type, and the type of the second operand must be int." Could you please explain the need for this restriction? In fact, i want this to be an insertion operator whe...more >>

Windows Services
Posted by weird0 at 3/28/2007 1:25:37 PM
I tried one of the links at www.codeproject.com/dotnet/simplewebservice.aspx , but i got stuck at the point after adding an installer. When selected Add->Project Output. The combo box should already have MyService.Service1, but it did not have that. Can anyone refer to some other good tutori...more >>

Looking for an XSLT 2.0 Tranform Engine
Posted by Eric Renken at 3/28/2007 1:23:42 PM
We are looking for a XSLT 2.0 transform engine that we can include with our commercial product and I was wondering if anyone had any ideas? We already looked at SAXON, but it looks like its license doesn't allow for redistribution. Any other ideas would be great? We would like a native .N...more >>

FormatException: Input string is not in a current format
Posted by weird0 at 3/28/2007 1:17:40 PM
localhost.BankingService bservice = new localhost.BankingService(); int balance=Convert.ToInt32(bservice.CheckBalance(InfoAccount.pincode)); // Line of Error How can i remove this error? I get the error above. Here are the definitions for the functions CheckBalance() and SearchDatabase()...more >>

How to find matches
Posted by Cub71 at 3/28/2007 1:10:04 PM
I am writing a code that will look at several peoples travel patterns and find people beeing at the same place at the same time. I would like suggestions on how to organize this. What to use? A table or arraylists or what? ...more >>

Cannot apply indexing with []
Posted by O.B. at 3/28/2007 12:27:21 PM
I have the following: public class Matrix3D { private const int SIZE = 3; public double[,] matrix = new double[SIZE, SIZE]; public static Matrix3D operator *(Matrix3D lhs, Matrix3D rhs) { Matrix3D result = new Matrix3D(); for (int i = 0; i < SIZE; i++) ...more >>

Connections
Posted by DaveP at 3/28/2007 12:03:49 PM
im writing a service that will be on a app server this is one of many service's to process Recordsets from Sql Server... 1 service may have 20 Processes to Complete example main class PreProcess() method CleanNames(); method updateNames(); methodr ValidateContracts(); Various things must...more >>

newbie in C# 2003, saving Asian characters to database problem
Posted by HibernatingBear at 3/28/2007 11:46:05 AM
Hope I'm posting in the right place. Have spent more hours than i would like on this problem and still have not solved it. I'm using SQL Server for the db. I have a GUI application with 2 multi-line textboxes that can be populated with Asian characters. I can't get the Asian characters to ...more >>

.NET Security
Posted by GMiller at 3/28/2007 11:42:12 AM
I am fairly new to .NET programming so this may be a simplistic question. I wrote a C# application that reads and writes files. If the program resides on a local drive everything is fine. If the program resides on a network drive then I get the following error. System.Security.SecurityExce...more >>

Binding a list to an enumeration...
Posted by Charlie NO[at]SPAM CBFC at 3/28/2007 11:33:31 AM
Hi: How would I bind a list to an enumeration so that enumeration value becomes list values and enumeration constants becomes list text? Do you loop through enum and add manually or is there a way to databind like when using a table as list backing store? Thanks, Charlie ...more >>

Scrolling WebBroswer works, but not when it has proper DOCTYPE!
Posted by Zytan at 3/28/2007 11:21:43 AM
I can scroll a WebBrowser to the bottom like so: if (webControl.Document != null) webControl.Document.Body.ScrollTop = int.MaxValue; But, if I include a proper DOCTYPE (for XHTML 1.1 DTD) like so: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11....more >>

C# IDE - commenting / uncommenting
Posted by Zytan at 3/28/2007 11:01:48 AM
Ctrl+E, C and Ctrl+E, U will comment and uncomment out multiple lines. However, it has two issues: 1. It will not include the // for empty lines, which makes it hard to 'see' that one group is altogether commented out. Since programmers very often use spaces to improve readability, this happ...more >>

get names of parameters
Posted by parez at 3/28/2007 10:42:29 AM
Hi All, int a; string b; float c; Test(a,b,c); How do i get the the Test function to print a b c public static Test(params object[] inputParams) { foreach (object inputParam in inputParams) { print(something); } } ...more >>

.Net 1.1 versus .Net 2.0
Posted by RobinS at 3/28/2007 10:11:07 AM
I am working at a company that is going to publish a product on the market. The code is currently in .Net 1.1. The developers would like to migrate it to .Net 2.0. Management has concerns about users having to install the .Net framework before using the product. They want to "minimize any...more >>

Printing landscape
Posted by FireStarter at 3/28/2007 9:43:09 AM
I am apparently unable to print landscape... maybe I'm doing something wrong here. I am adding a printDocument to a form. The form also has a textbox containing the text that I want to print and a button that triggers the printing. All properties of all objects are left intact for simplicit...more >>

silence detection
Posted by carthia at 3/28/2007 9:42:24 AM
Hello All, I need to determine speaking time, but without pressing any button (such as start speaking/stop speaking), e.g. how long each person(microphone) was speaking during one meeting, and s/he should see results in real-time. And I am stuck, do you have any solutions?? Thanks in advance...more >>

Easily set TopMost for all forms in a project?
Posted by james at 3/28/2007 9:16:19 AM
I have a project with 50+ forms that needs to be made topmost. Is there a faster way than manually setting topmost=true for all forms in the project? Then how do I guarantee that dialogs get set topmost? Thanks, James ...more >>

How to get attribute type from Active Directory
Posted by shashank kadge at 3/28/2007 8:41:24 AM
hello experts, I want to get attribute type (whether single value or multivalue) from AD forest/domain. Does any1 know how to get that. Or at least how to get AD schema using C#. Any help/links wud be appreciated. thanks, shashank kadge ...more >>

create array of structs, accessed by enum
Posted by Zytan at 3/28/2007 7:34:27 AM
I have an enum. I want a struct of data associated with each one. Then, I could use the enum to access the data as needed. In other words, I want the enum to represent more than just a unique integer. I want it to represent a struct. Is there a way to do this nicely? Searching seems to sa...more >>

Assigning value to parameter in stored procedure
Posted by jed NO[at]SPAM auto-soft.co.za at 3/28/2007 7:29:33 AM
I have tried sqlCommand1.Parameters[0].Value = float.Parse(textBox1.Text); but the debugger says that it cant see the parameter How can i gain access to the parameter in C# EXpress.thanks in advance(i am newbie). ...more >>

Hide Form on Load
Posted by mqudsi NO[at]SPAM gmail.com at 3/28/2007 6:14:25 AM
I'm making a system tray application, and I just can't figure out how to make it hide on execution just like it used to in C++. If I have a button the form and in the button's Click method i have {this.Hide();} The entire form will disappear. But if I put "this.Hide()" in the from's onLoad ...more >>

Beginners Question About MIME Handling
Posted by Datawright at 3/28/2007 5:15:14 AM
Apologies if this is a daft question but I'm new to c# and everything is strange to me. I have written a SOAP Extension class that intercepts a web service that returns MIME attachmernts as part of a multipart. I have split the MIME into strings which I write to a file via a BinaryWriter. All ...more >>

Large TXT Files
Posted by Just close your eyes and see at 3/28/2007 4:48:03 AM
Hello All i am trying to read a large txt files -may 1 GB-, which coze my program to hang, and i need to know if there are techniques that make this without hang and do it faster if you know something can help. please tell me. that is my code , and i had run it for a txt file its size is 4...more >>

Beginners Question About MIME Handling
Posted by Datawright at 3/28/2007 4:35:39 AM
Apologies if this is a daft question but I'm new to c# and everything is strange to me. I have written a SOAP Extension class that intercepts a web service that returns MIME attachmernts as part of a multipart. I have split the MIME into strings which I write to a file via a BinaryWriter. All ...more >>

Unittest of GUI
Posted by davidspoulsen NO[at]SPAM gmail.com at 3/28/2007 4:14:48 AM
Last year I read an article about using unit testing GUI. I think it was a patterns & practices article, but I can no longer find it. The article described how to unit test GUI using stubs. Can anyone help me find the article or similar articles? ...more >>

KeySet
Posted by Stephan_W=F6ffler at 3/28/2007 1:19:03 AM
Hallo, ich m=F6chte, dass bei Eingabe eines Zeichens =FCber die Tastatur (alle Zeichen ausser Funktionstasten) eine Aktion passiert. Dazu habe ich die Methode protected override bool ProcessCmdKey(ref Message msg, Keys keyData) =FCberladen. Gibt es KeySets, mit denen ich keyData auf...more >>

sealed methods, why need to include the override modifier?
Posted by muler at 3/28/2007 12:00:04 AM
"If an instance method declaration includes the sealed modifier, it must also include the override modifier." The C# Programming Language, =A7 10.5.5 Sealed Methods Why is this? Thanks, Mulugeta ...more >>

Class Library Configuration Files
Posted by Peter Bradley at 3/28/2007 12:00:00 AM
OK. A bit behind the times, I know; but we're just moving over to .NET 2.0. How on earth do you manage configuration settings in a class library in .NET 2.0? In version 1.1, we used a handy class called AssemblySettings that someone (I forget his name) had written. When the class library wa...more >>

Casting in a generic function
Posted by Vincent Finn at 3/28/2007 12:00:00 AM
Hi, I am trying to write a generic function and it isn't behaving as expected. I want to avoid having to write custom convert functions for my enums so I want to convert to an int and cast to the enum, this wouldn't compile so I tried a few variations. The cast fails inside the generic fu...more >>


DevelopmentNow Blog