Groups | Blog | Home


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# > november 2005

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

problem in XML file while converting to string........
Posted by sridev at 11/30/2005 11:49:38 PM
hi all, i have a xml file.I have converted the xml file to String using OuterXml....... now i am getting like this "<ClientList><Client action=\"Modify\"><ClientID>nokia</ClientID><FullName>Raj</FullName><AccountNo>12345</AccountNo><Type>Individual </Type>...more >>


Synchronising SQL Server 2005 mobile with SQL Server 2005 Express
Posted by Paul Aspinall at 11/30/2005 10:23:52 PM
Hi I have an application which runs on a desktop. I want to synchronise the DB with a PDA app, which also uses SQL Server 2005 (mobile and express). I believe that I will need to write my own synchronization application, in order to update the data across the machines. My questions are: -...more >>

AppDomain.CurrentDomain.AppendPrivatePath Depreciated?
Posted by Benny Raymond at 11/30/2005 10:20:53 PM
What should I do instead of this: AppDomain.CurrentDomain.AppendPrivatePath(Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + @"\plugins"); now that AppDomain.CurrentDomain.AppendPrivatePath is depreciated?...more >>

How to convert unsignedshort[] to string ?
Posted by Prakash at 11/30/2005 9:56:59 PM
Hi Friends, Using Remoting concept, i have send WCHAR[] values from VC++.net applicaiton to C# applicaiton. In my C# application it is treated as unsigned shot[]. I need to convert it back to string and display it. I tried with TypeConverter.GetConverter().ConvertToString() functionality. a...more >>

Restricting access of class variable to another single class?
Posted by Danny Tuppeny at 11/30/2005 9:43:02 PM
Hi all, The next few paragraphs put my question in context, but feel free to skip down to the end if you don't care *why* I need the answer! :) **************************************** *** Start of long-winded description *** **************************************** I've got some classe...more >>

DropDownList SelectedValue returning "out of the range"
Posted by Brent at 11/30/2005 9:40:20 PM
Here's my function: public void getInterestLevelDDL(string co_interest_level) { sql = [valid sql]; //get_select_list creates a valid ICollection datatable ctrlDDL_CIL.DataSource = tools.get_select_list(sql); ctrlDDL_CIL.DataTextField = "value"; c...more >>

system shutdown check from windows service
Posted by Myo Zaw at 11/30/2005 9:18:02 PM
hi, i have a windows service that check to the external web site httpwebresponse and save the result into log text file. and, my problem is when i shut down my system, i also would like to save the time that i shut down my system into that log file. but, i don't know how to do that. so...more >>

Checking wether a socket is closed
Posted by Nuno Magalhaes at 11/30/2005 8:23:58 PM
I've got a simple problem I guess. How do I know when a connection is terminated without losing any data? I do something like the code below, but sometimes between socket.Receive and socket.Send I get the last chunk of data and am not able to retrieve it anymore cause the socket will be dead. ...more >>



Returning values to a method from a switch statement
Posted by Ant at 11/30/2005 8:12:02 PM
Hi, I need to return a value to a methods call from a switch statement nested in the method. How can this be done? int myMethod(int someValue) { switch (someValue) { case(1): { return anotherMethod() } case(2): { return somethingElse() ...more >>

Tell Debug and Release files apart
Posted by Rene at 11/30/2005 7:56:06 PM
Is there a way to tell if an assembly was compiled on Debug or Release mode? I tried viewing the file usin Ildasm but did't notice any special comment line or something that would tell me if it was Debugged or Released. Thanks. ...more >>

How to get the online computers list in AD ?
Posted by roopeman at 11/30/2005 7:46:02 PM
i can search objects in AD,someone can tell me how to get the online Computers in AD ?...more >>

Search From Search Engines
Posted by sb Luis at 11/30/2005 6:59:43 PM
Hi, I want a class (C#.NET) whitch can get the result of famous search engines (yahoo, altavista, ZDnet and ....) and show them. thanks in advance. Luis. ...more >>

Conditional compilation attribute
Posted by vooose at 11/30/2005 6:25:37 PM
Consider a class property: private int field; public Order Field { get { return this.field; } set { this.field= value; } } Is there any way to omit the setter if, say, DEBUG is defined? I don't want to do: #if !DEBUG set { this.field= value; } #endif I would prefer: [OmitT...more >>

DataBindings.Add
Posted by C Glenn at 11/30/2005 6:19:34 PM
This is admitedly vague. But so is my understanding of the problem. I'm using this chunk of code: retControl.DataBindings.Add(ctrlBinding.PropertyName,DataSource[i],BindingField); This resolves to something like: Control.DataBindings.Add("Text", SomeDataTable.Rows[1], "Priority"); The...more >>

Locking techniques
Posted by Laura T. at 11/30/2005 5:46:49 PM
To synchronize thread access to shared objects, I've always used the lock(shared_object) { } pattern. I've seen many recommendations and examples where to synchronize use lock(another_object) { use shared_object; } pattern. I do not see any reason to have another simple object to lock for si...more >>

Working with time durations
Posted by Ant at 11/30/2005 5:36:03 PM
Hi, I need to find out what data types I need to work with time durations & how to add/subtract them from clock time. For example: A customer logs in at 7:30 in the morning. I need notification 40 minutes after the custmer has logged in. (at 8:10). It needs to work with 24 hour time as well...more >>

Can a method be declared with a parameterized return type?
Posted by Brad Wood
It doesn't look like something like this is possible in 2.0: public <T> doStuff(); Am I correct, and if so, there's probably a good reason that I can't think of why not......more >>

how to finde out in C# that a prossess "exe" is allready running or not ?
Posted by Saleh Matani at 11/30/2005 5:17:48 PM
how to finde out in C# that a prossess "exe" is allready running or not ? and how to make programm wait 1 sec between checks? thank you Saleh Matani...more >>

Simple question
Posted by Marty List at 11/30/2005 5:03:20 PM
I have a C++ background, I'm new to C#, and I'm trying to clean up someone else's code: if(purge) for(int j = 1; j < 2; j++) try{ dumpster.Remove(1); } catch(Exception e){ WriteEvent(ErrorSource, e.StackTrace, LogType.Error); } Question #1: The "fo...more >>

socket programming and windows service
Posted by Ankit Aneja at 11/30/2005 4:09:52 PM
I am making windows service using Microsoft visual studio.Net in C# service name is clamservice problem is that when i start the service it through control pannel->Administrative tools->services it shows "starting" and never shows "started" it goes somewhere in loop i am doing some logical mist...more >>

SQLDataAdapter. ODBCDataAdapter etc. Habe they disappeared from .Net 2.0 Webforms
Posted by Rob Dob at 11/30/2005 4:01:10 PM
SQLDataAdapter. ODBCDataAdapter etc. Have they disappeared from .Net 2.0 Webforms? can somone please elaborate as I cannot seem to find support for these.. ...more >>

how can get windows usercontrols from RunTime ganerater Form
Posted by Mian Mahboob at 11/30/2005 3:23:47 PM
Nicholas Paldino in my application a have an Windows form on that i place an Panel Control. in Form load event i ganerate an Form in Panel Control on Runtime then get an design time create user-control (textbox, 2 buttons) in Runtime Form Runtime Form may be contain more then 1 same or ...more >>

Anyone know how...
Posted by O-('' Q) at 11/30/2005 3:16:13 PM
....to translate the following to C#.NET style? var i: Integer; begin txtMyIP.Lines.Clear; sHTML := HTTP.Get('http://www.network-tools.com/'); if sHTML = '' then Exit; sIpAddr := 'IP unavailable.'; i := Pos('host', sHTML); if i = 0 then Exit; ...more >>

Databinding to business object
Posted by David Veeneman at 11/30/2005 2:56:14 PM
Hi-- I'm trying to databind a business object to several controls using the DataBindings property of the controls, like this: textBoxStartDate.DataBindings.Add("Text", CurrentStep, "StartDate", true, DataSourceUpdateMode.OnValidation, String.Empty, "d"); ...more >>

Comparing numbers and determing the biggest.
Posted by esparkman at 11/30/2005 2:49:05 PM
Hey guys! 1st time poster here. Got a quick question. I'm just beginning my journey into csharp and am developing a win32 app that will retrieve a given useres account pull raw data from a db and display that info. One of the things i need t odo is look at 7 entries and compare those and then de...more >>

BindingSource...?
Posted by Daniel R. Rossnagel at 11/30/2005 2:19:27 PM
To determine from assembly whatever bindingsource has the form that uses this assembly and to obtain a listing of such ...more >>

what do i need to compile for compact framework / mobile devices?
Posted by Digital Fart at 11/30/2005 1:25:01 PM
what ms product do i need to buy to compile programs for the compact framework and mobile devices? looking at there vs products i only see the architect version. Very expensive as we only need to compile a sourcecode that we bought from a vendor. We only need to adjust some small pieces of co...more >>

Abstraction Issue
Posted by Cody at 11/30/2005 1:08:59 PM
We have a situation where our adapter (Assembly A) gets data from a database and gives the data to an internal service (Assembly B) which then gives it to the client (Assembly C). By the time it reaches Assembly C, the source information of where the data came from is lost. In other words, Ass...more >>

newby C# web app cookie question
Posted by Fred Nelson at 11/30/2005 12:57:21 PM
Hi: I'm developing a web application that needs to have five values, each retrieved from cookies on many pages. If I have five "Request.Cookies" commands together does this cause five "round trips" to the browser or am I accessing one instance. If five round trips occur then I will devel...more >>

Office Web Component Events
Posted by gbradford3 NO[at]SPAM excite.com at 11/30/2005 12:44:49 PM
I am creating a C# windowsform app and I wish to use the OWC10 com component. I have followed the below instructions to enable events on the component: "HOW TO: Handle Events for the Office Web Components in Visual Studio .NET" - http://support.microsoft.com/default.aspx?scid=kb;en-us;328...more >>

urgent help needed with exception handling.
Posted by Jack jensen at 11/30/2005 10:44:46 AM
Hello, I have the code below :(simplified zip code format) try { Convert.ToInt32(tbOShipPostalCode.Text); } catch { MessageBox.Show("The zip code must be a number.", "Zip code error", MessageBoxButtons.OK, MessageBoxIcon.Error); } ...more >>

Logging messages in a class based on who is using it...?
Posted by JohnW at 11/30/2005 10:35:55 AM
Hi, I'm not sure of the terminology here but... I have a standalone assembly (Foo) and I log errors using a simple call in my "catch" blocks: e.g. class Foo .... public DoSomething() { .... catch { LogError("blah", Severity.Error, etc....); } .... void LogError(msg,sev,...) { outpu...more >>

UTF8 Question
Posted by Nuno Magalhaes at 11/30/2005 10:27:53 AM
Why does (in the code below) the message should appear as "keep-alive - keep-alive - test" but it only appears as "keep-alive - keep-alive". That is why the last comparation (Equals) isn't getting true. Is it from the "Convert.ToByte('\0')" that does the comparation false? I'm shure that the str...more >>

Clearing Session Variables
Posted by Amy at 11/30/2005 10:23:51 AM
I'm having a problem with clearing my session variables. I'm using session variables to pass data from a web form to a pdf generator. The problem comes in when a user goes back to the original page and takes data out of the field - the session variable is persisting. i tried the following, an...more >>

BackgroundImage: Slow Redraw for runtime loaded bitmaps
Posted by jgraham at 11/30/2005 9:56:01 AM
I have an application which configures the user interface (UI) at runtime, meaning, the images that make up the UI are loaded based on the current configuration when the application starts. The UI is populated with normal controls (buttons, lists, etc.) but some controls can load a bitmap to re...more >>

Serious Threading.Monitor issues in .NET 2.0
Posted by Michael Kennedy at 11/30/2005 9:43:43 AM
Hi, I have been looking into the claim that the keyword lock is not safe when exceptions are possible. That lead me to try the following code, which I think has uncovered a serious error in the .NET 2.0 framework. Note that this runs better, but not perfectly, on .NET 1.1. Note: The numbers...more >>

Marshalled structure size
Posted by Laurent at 11/30/2005 9:38:37 AM
Hello, This is probably a dumb question, but I just would like to understand how the C# compiler computes the size of the managed structure or classes. I'm working on this class: [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi)] public class MyClass { pub...more >>

communicating with remote server via http
Posted by Greg at 11/30/2005 9:33:47 AM
I've been tasked with writing a small app to that needs to talk to a remote server via raw http. Data is to be sent and received using name-value pairs. I have been given the syntax for various http requests. My app doesn't know much about the server app (on a customer's computer). Where do I...more >>

Why does Guid.GetHashcode() returns 0 when instantiated with Guid.Empty ?
Posted by csharper at 11/30/2005 9:08:57 AM
Why does Guid.GetHashcode() returns 0 when instantiated with Guid.Empty ? ...more >>

making an http server
Posted by lucifer at 11/30/2005 8:53:29 AM
hi i am making an http server it has following functions main() { if option is "-?", output the hints and stop check the directory supplied is sensible and not a security risk become a daemon process ignore child programs (to avoid zombies when child processes stop) create a socket, bind ...more >>

IResettable - a suggestion for the next version of WinForms
Posted by Andrew Ducker at 11/30/2005 8:36:26 AM
Almost every project I work on, I end up with some variant of an IResettable interface - so that controls can be reset to a default value. Controls have a ResetText method, but that's not much use for checkboxes, and you can't set a default for things to be reset back to, on a control by contro...more >>

can we do fork() in c#
Posted by lucifer at 11/30/2005 8:02:45 AM
hi i have code that i have to implement in c# Code: /* Become deamon + unstopable and no zombies children (= no wait()) */ if(fork() != 0) return 0; /* parent returns OK to shell */ (void)signal(SIGCLD, SIG_IGN); /* ignore child death */ ...more >>

hunting down a memory leak
Posted by jason at 11/30/2005 7:55:20 AM
my w3wp.exe process has recently gotten an ever-expanding memory footprint. the two most likely causes are either a memory leak in the object library it uses, or session variables not getting cleaned up correctly. this post is to check one thing in the object library, to make sure that the "usin...more >>

Preventing files being added to a directory
Posted by Greg at 11/30/2005 7:10:08 AM
Is there an easy way to design a service that "listens" for attempts to add files to a specified directory, and on detecting an attempt starting another exe? I've no idea how feasible it is without getting too deep into the WinAPI. ...more >>

HttpWebResponse how does it end
Posted by Nuno Magalhaes at 11/30/2005 6:51:34 AM
In pages that there is no content length, how does HttpWebResponse knows where the page ends? And what kind of objects/methods does it retrieve? Does it only retrieve the initial page without any images, i.e., does it only makes one "GET / HTTP/1.1\r\n\r\n"? Because I'm doing some projects on ...more >>

How to prevent UserControl property Auto code generate
Posted by Sharon at 11/30/2005 5:36:27 AM
I'm writing my own control that derived from the UserControl. In my control I have some public properties (with get and set) that I do not want them to be shown on the designer properties window and I also do not want the Windows Form Designer to generate code automatically on the user Form f...more >>

how can i get a list of all the exchange servers in a domain?
Posted by akis at 11/30/2005 4:49:05 AM

TROUBLE DEPLOYING SIMPLE C# APP TO WINDOWS 2000 Machine
Posted by Richard Mintz at 11/30/2005 3:59:06 AM
Hi, I am trying to deploy a C# application to a Windows 2000 machine. When I try to run the app after the install i get a runtime error. the setup works on both XP and windows 2003 server machines. Any Ideas Thanks for your help ...more >>

Does MethodImpl Synchronized atribute is like lock(this) ?
Posted by yaron at 11/30/2005 3:50:02 AM
Hi, Does MethodImpl Synchronized attribute is like lock(this) ? i mean that a call to Monitor.PulseAll(this) from a Synchronized method will trigger other thread that call to Monitor.Wait(this) ? Thanks. ...more >>

retain checked state of checkbox
Posted by voodoman NO[at]SPAM gmail.com at 11/30/2005 3:19:24 AM
hi there can't work out for the life of me at the mo why the code below doesn't do what I want. the last matching PK it finds sets the checkbox and this is the only 1 that displays. any ideas please. int contractCounter = 0; foreach(Timesheets.Contract oContract in allContracts) { ...more >>


DevelopmentNow Blog