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# > june 2006 > threads for friday june 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 29 30

How does this work?
Posted by william at 6/23/2006 10:36:12 PM
You guys are a great resource for learners such as I. I have seen the way that you go over and above in explaining even the most mudane things to beginners, and I think it is a great thing that you do here. I only hope that you can help me understand how a certain type of application works....more >>


return a private enum
Posted by Valmont at 6/23/2006 10:33:19 PM
Complete newbie at C#. Class below stripped for brevity. How do I return a private "Status" from a public method? I may need a set/get but I don't know how to do that on an enum. Thank you. public class SomeClass { private enum Status {OK , NOK, UNK}; public Status check_s...more >>

Evaluating a variable name
Posted by encoad NO[at]SPAM gmail.com at 6/23/2006 9:34:41 PM
Hi everyone, I've run into another road block that google.com isn't able to solve since I don't even know where to start when searching. In my webapp, a certain number of table rows containing textboxes is displayed depending on a number chosen by the user. For example, if the user chooses...more >>

Interesting App domain issue
Posted by Alvin Bruney [MVP] at 6/23/2006 8:19:19 PM
I have two managed windows applications A and B. Both have their own config files. Application A invokes application B thru process start. However, since B runs in A's context, B starts up and reads A's configuration file instead of it's own. I didn't even realize that this was possible. To...more >>

How to show the value of a private variable in some debug window? (C# Express)
Posted by Johann Schuler at 6/23/2006 7:10:40 PM
Let's say I have a Person class with a private int age member variable. I have a get and set accessor for the Age property. When I am running the code in debug mode, I would like to have a debug window show me the value of age (rather than the value of the Age property). Is there a way to do t...more >>

How to show line numbers in .cs file? (C# Express)
Posted by Johann Schuler at 6/23/2006 7:10:36 PM
I am using C# Express. Is there a way to set it to show line numbers in the code? Thanks! ...more >>

Workin with progress bars
Posted by Scirious at 6/23/2006 5:14:21 PM
People, I want to do same things with a progress bar but I don't know how. So, how do I change it to make it a solid bar, not a step byt step as the default? And how do I make it a vertical bar? Also, how do I put a progress bar withing a button? TIA, Scirious. ...more >>

How to get the same as MS FCIV
Posted by andrewcw at 6/23/2006 5:02:02 PM
I have a VB 5 program that computes an MD5HASH on a file. I can get the same number using Microsoft FCIV. But this code does not. ( What more should I do to get the file's hash as the legacy and MS FCIV tool ?? In my attempts at code I get the file length and then convert that to a strin...more >>



Timer ticks?
Posted by Ole at 6/23/2006 3:22:08 PM
Is there a way to get ticks from a the system without using the DateTime.Ticks (there isn't a watch in the hardware so it doesn't work)? The Thread.Sleep(x) works well so where does it get its information from? Thanks Ole ...more >>

UserControl Question
Posted by Pete Kane at 6/23/2006 2:24:01 PM
Hello All, I just created my first user control in VS 2005, it consists of a TabControl with two pages, and several textboxes and labels on each page, I built it, and added it to my toolbox, however !, having placed the control on a form, I can't access any of the controls within it ?, is this n...more >>

Control.Invoke and ref parameter
Posted by George at 6/23/2006 2:02:01 PM
Hi, Does anyone know how Control.Invoke can invoke a method which has ref parameters? For example, class A { public delegate MyFuncHandler(ref int i, ref int j); public void MyFunc(ref int i, ref int j) { .. } public A public void MyCaller(DataGridView oDataG...more >>

How to access object in array by property value?
Posted by Katit at 6/23/2006 1:52:11 PM
Is it possible to find object in array with specific property value? Just like dataset filter? Thanks! ...more >>

beginner's question: const vs readonly
Posted by R.A.M. at 6/23/2006 1:22:19 PM
Hello, I am learning C#.NET and I donst understand difference between meaning and usage of "readonly" and "const" keywords. Could you explain me please. Thank you /RAM/...more >>

Help With Nesting Classes In Library
Posted by joey.powell NO[at]SPAM topscene.com at 6/23/2006 1:01:32 PM
I am writing a class that will do some binary file IO. The class will need to read a header from the binary file, and it will also need to read a varying number of records in the file. I currently have two main methods: Open(string FilePath) and Close(). I would like to read all of the data into...more >>

System.Type.Type()
Posted by Robert Towne at 6/23/2006 12:50:44 PM
What happens if I pass the assembly-qualified name of some type to "System.Type.GetType()" where the name I pass originates from another machine. For instance, for a standard button control, what if I invoke: Type.GetType("System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, ...more >>

Non-Sequential Binary Reads
Posted by joey.powell NO[at]SPAM topscene.com at 6/23/2006 12:30:46 PM
Does anyone know of a .net class that allows for non-sequential reading of binary files? It would offer a Seek() function or something similar. The BinaryReader appears to only read forward from the beginning of the data (much like the SqlDataReader does). Any suggestions? ...more >>

How do i escape { and } in a format string
Posted by TS at 6/23/2006 12:20:49 PM
when creating JS for client side and I use StringBuilder.AppendFormat to add some args to a dynamic string. I can't use the { or } to open and close JS methods on the .AppendFormat line though i can do it on .Append How do i escape { and } ex: sb.AppendFormat("function {0}(source, ...more >>

Fairly simple I think
Posted by Robert Towne at 6/23/2006 11:58:23 AM
If I have a string representation of a property such as "MyObject.SomeProperty", how would I then create a "MyObject" object and invoke "SomeProperty". Any assistance would be appreciated. Thanks. ...more >>

Delete a line from a text file
Posted by tomtown.net at 6/23/2006 11:36:12 AM
Hello I'm trying to get a single line removed from a text file using a search pattern (pretty simple: if line contains "NODE1") -> remove line). To achieve this I's like to operate with only the original file and no temp file since the file is 1. on a network resource 2. pretty big 3. accesse...more >>

"lock" keyword and exceptions
Posted by Ron M. Newman at 6/23/2006 11:04:56 AM
Hi. Quick question: - I have a class with fields. There is one method that modifies them. in this method I have something like lock (this.lockObject) { /// throwing exception here... } My quetion is, if an exception is thrown within the lock block, will the lock be released or w...more >>

Sorting A DataTable
Posted by David P. Donahue at 6/23/2006 11:00:58 AM
I've been looking around for ways to sort the rows in a DataTable, and everything seems to point to just changing the Sort property on that DataTable's DefaultView property. That's all well and good for viewing it sorted, but I need it to actually _be_ sorted, and testing seems to show that...more >>

MethodInfo.Invoke and reading ref parameters
Posted by ian at 6/23/2006 10:51:19 AM
Hi, I can't find a solution to this, so I've brought it to the experts. Using reflection I can get a MethodInfo object pointing at an assembly's method. Where I have a MethodInfo object pointing at a function, say func(int p1, ref int p2), how do I read p2 after a successful invocation? I'v...more >>

get user id
Posted by John at 6/23/2006 10:36:05 AM
Is there a way to get the logged in user and if the user id does not match mine to log them out? I'm going on vacation for 2 weeks, and my co-workers are pranksters, so if they log into my pc to do whatever, I want to kick them out right away. ...more >>

Custom Application Settings
Posted by rob at 6/23/2006 9:50:20 AM
Using the settings editor I am trying to add a setting whose type is a custom type. In a first approach I tried a class marked as [Serializable]. But then when I try to get the property the way shown bellow I get null returned. MyProperties prop = Properties.Settings.Default.MyProp Assuming...more >>

Byte Order Woes
Posted by joey.powell NO[at]SPAM topscene.com at 6/23/2006 9:10:28 AM
Hello, I need to be able to read a binary file that contains fields written in BOTH big endian and little endian byte orders. I am currently unable to read the big endian fields (erroneous values because of the different byte orders). I am currently using FileStream and BinaryReader objects...more >>

Updating Application Icon
Posted by randy1200 at 6/23/2006 8:58:01 AM
I have a Windows application that previously had the company logo "MyCompany.ico" added to the upper left-most corner. The company has since issued a new version of "MyCompany.ico" that looks completely different. I overwrote the old ico file with the new ico file and re-ran the program. I ...more >>

Calling javascript from a C# condition?
Posted by VMI at 6/23/2006 8:08:02 AM
How can I call my javascript from within my C# "IF" statement? I have a function called dirError() that only displays an alert: function dirError() { alert('Bad directory'); } From my C# code, I want to do this: if (fileEntries.Length <= 0) { //CALL javaScript function dirError ...more >>

Impersonate and LogonUser()
Posted by schaf at 6/23/2006 7:39:05 AM
Hi NG ! I used the examples on the internet to create a Impersonate class which allows me to log on as another user. After logged on as the new user I could access files on a remote computer, which is in the same domain. So I tried the same on a computer which is not in the same domain. I could...more >>

SQL Updates
Posted by Sehboo at 6/23/2006 7:32:16 AM
Hi, I have sql updates that I need to apply to the new version of my application. This is a text file with bunch of updates like new tables, stored procedures, etc. I can run this file on sql query analyzer to apply all the updates at once. This has bunch of "GO"s to seperate different st...more >>

Exchange and C# - beginner's question
Posted by Rik Brooks at 6/23/2006 6:44:02 AM
I'm afraid that I've not done anything with mail for over 10 years. Back then it was C and Mapi. My boss wants me to display unread messages in the mailbox on our intranet site. I'm writing this in C#. I asked him for his pop3 address and he said that we are using Exchange and haven't turned o...more >>

Parameters byref
Posted by Arne Garvander at 6/23/2006 6:37:01 AM
I hace a function that needs to return two integers. I know that objects can be passed by reference and updated in a function. Can I do the same thing with primitive value type parameters? -- Arne Garvander (I program VB.Net for fun and C# to get paid.)...more >>

C# SqlConnection question in SQL Server 2000
Posted by Jason Huang at 6/23/2006 12:00:00 AM
Hi, In our C# windows application, if we build up a SqlCommand array, saying TestCommand [20]. And in the SqlCommand array, later on we try each TestCommand[0], ..., TestCommand[19], by testing the TestCommand[i].Transaction, TestCommand[i].ExecuteNonQuery(). Will this cause problems in ou...more >>

How to compare two byte arrays?
Posted by Ole at 6/23/2006 12:00:00 AM
How do I compare two byte arrays in a if statement? Thanks Ole ...more >>

Dataviewgrid : different cell editors in the same column.
Posted by John at 6/23/2006 12:00:00 AM
Can anyone give me hints on how to do this? I need to have a single column in a dataviewgrid whose cells can be set to either a combo box, a text edit or a check box, different for each row of the grid. -- "I have nothing but the greatest respect for other peoples' crackpot beliefs"...more >>

What is ReadTimeout good for in serial ports?
Posted by Ole at 6/23/2006 12:00:00 AM
I can't get the sense of the ReadTimeout property in the serial port - what is the function of it? the serialport.Read returns immediately no matter how many bytes you ask it to read and no matter what ReadTimeout is set to???? Thanks Ole ...more >>

csharpbuilder shortcuts
Posted by Dennis Kuntzemann at 6/23/2006 12:00:00 AM
Hello, does anybody has a list or link for the shortcuts that are being used in csharpbuilder 2003? thank u very much best regards, dennis ...more >>


DevelopmentNow Blog