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 2004 > threads for friday june 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

Checkboxes in C#
Posted by jim.ferris NO[at]SPAM motorola.com at 6/18/2004 10:36:07 PM
Im trying to create 2 check boxes, but only one can be checked at a time or none can be checked.. I know radio buttons are used for this functionality but I need to be able to unchecked them as well so that neither are checked...any ideas? thanks -Jim...more >>


Bug in Decimal.Parse()
Posted by GP at 6/18/2004 8:14:55 PM
Decimal.Parse("100,5") returns 1005 when it should throw an InvalidFormatException. The locale is US therefore the "," is a thousand separator. Even if the parser confused it for the decimal separator it should return 100.5. Maybe this bug is already logged but I couldn't find it on MSDN. -- ...more >>

changing name
Posted by e-mid at 6/18/2004 5:36:05 PM
i am working with a form, i used default name form1.cs when i opened the project , now i want to change it but when i change the name on the properties window of the mainform , it does not change? how can i change this name? ...more >>

[Q] How to define an array of IPAddress-es
Posted by stuie_norris NO[at]SPAM yahoo.com.au at 6/18/2004 5:35:16 PM
Dear Readers, I am attempting to define an array of IPAddress-es in C#. I wish to have a array of address so I can try in order to connect to them in a loop to handle unavailable hosts. Todate since I do not know how to define an array of IPAddress-es. I have been defining variable lik...more >>

Please help me with the following code
Posted by NotYetaNurd at 6/18/2004 4:34:56 PM
Please help me with the following snippet float withdrawal=(objgetWithdrawal is float)? (float)objgetWithdrawal :0; float expence= (objgetSpending is float)? (float)objgetSpending :0; lblBal.Text="Current Balance = Rs." + (withdrawal-expence) > 0.0F? //here i am getting the error "Operat...more >>

Regular Expression to Capture VB Declarations in Visual Studios Find/Replace
Posted by JackRazz at 6/18/2004 3:59:23 PM
I'm trying to use Visual Studio's Find/Replace to match VB declarations. This RegEx works fine in Regulator: ^\s*(Public|Friend|Protected|Private)*\s*(Shared|Overrides)*\s*(Sub|Function|Property )+ But when I try it in Visual Studio's find (with regular expressions turned on) it doesn't ...more >>

Get data From DataGrid
Posted by Gidi at 6/18/2004 3:49:01 PM
hello, how can i take the data i entered to a dataGrid and put it to a dataTable ( i know how to insert data to DataTable, i just don't know how to get the data from the dataGrid), by the way i'm writing in C#...more >>

GetType not working?
Posted by Darren Clark at 6/18/2004 3:33:53 PM
I am having some troubles with loading up a type dynamically. From what i have read Type myType = Type.GetType("WB.DataAccess.FAQ"); is the exact same as Type myType = typeof(WB.DataAccess.FAQ); HOWEVER..... in practise it doesnt quite work..... using typeof always works.... howeve...more >>



methods without sideeffects (proposal)
Posted by cody at 6/18/2004 3:14:13 PM
There should be a way to mark methods without sideeffects with a special Attribute so that the compiler can recognize them and is able to issue a warning: public class string { [NoSideEffect()] // alternatively we could name it [RequireUseReturnValue()] public string Trim() { ...more >>

form resizing
Posted by Grant at 6/18/2004 3:00:43 PM
Hello, Ive got a form with 3 textboxes - one under the other. When I set the anchor to top, left, right, and bottom for each of them and resize the form at runtime, they change size in relation to the bottom of the form. This means the textbox on top stretches underneath the textbox below i...more >>

C# compiler bug
Posted by Subramaniyan Neelagandan at 6/18/2004 2:23:48 PM
The following program outputs False rather than True. using System; namespace Test { public struct V { public bool booleanV; public void setBoolean(bool _value) { booleanV = _value; } } public class C { public readonly V Value; } public class StructB...more >>

how do i get a list of types in a namespace?
Posted by Darren Clark at 6/18/2004 2:18:11 PM
Say i have namespace FOO.. and i want to get a list of all the types that are declared in FOO how can i do this? ...more >>

ListView background image
Posted by Gacu at 6/18/2004 2:14:14 PM
Hi, Is it possible to set ListView background image ? Thanx ...more >>

ASP to C# Q
Posted by Jeff Johnson at 6/18/2004 1:51:18 PM
How would I convert this ASP code to C#? arrData = comPlusObject.Execute("a", "b", "c") for(i=0 to ubound(arrData)) response.write(arrData(i)) next Thanks, Jeff ...more >>

Null reference makes no sense
Posted by mbelew NO[at]SPAM koiosworks.com at 6/18/2004 1:36:15 PM
My stack trace contains: System.NullReferenceException: Object reference not set to an instance of an object. but the line of code it refers to looks like this: if (null == unit || ! unit.Enabled) return; Am I just missing something? The short-circuit evaluation of this line shoul...more >>

how to cast an object to the type stored in a System.Type variable?
Posted by Fred Zolar at 6/18/2004 1:34:26 PM
Anyone know how to cast an object to the type stored in a System.Type variable? I need to cast m_oValue to an int, bool, ect... based on the variable Type. public class TestClass { private object m_oValue; public System.Type Type; public object Value { get { return m_oValu...more >>

Reverse Engineer database for C# project
Posted by microsoft.public.dotnet.languages.csharp at 6/18/2004 12:58:08 PM
I have Visio Professional that comes with the MSDN Universal subscription. I need to reverse engineer a database using Visio and create the DDL. I can only find information on creating the script by building the database within Visio. Our database is already created. I want to reverse engine...more >>

How I can hide a public property in Visual ?
Posted by Boniek at 6/18/2004 12:45:51 PM
Hi I define a public property in a new form and I can see this property in table of Properties in Visual. How I can hide this property to see only in code ? Thank's Boniek ...more >>

Dynamic Assembly Loading
Posted by Stelios at 6/18/2004 12:03:40 PM
Does anyone know how to dynamically load an assembly from a location other that the working directory by using Assembly load method. It is important to use the specific method because is the method used by CLR to enforce version and security checking. I have try by changing the appdomain APPBA...more >>

Windows controls naming convention
Posted by Lynn C at 6/18/2004 11:41:02 AM
Hi, Does Microsoft have a listing or a guideline for naming controls in a C# Windows application? i.e. combobox - cbx, dataset - ds Thanks, Lynn...more >>

The times should display in logged-in user desktop time zone
Posted by Vaj at 6/18/2004 11:30:08 AM
hi, i would be very thankful if u can help me in solving this problem. my problem is i 've a page in that i'm displaying the creation dates of all files. these dates are like server dates . now i've to display these creationdates in the current logged in user desktop timezone. thanks ...more >>

Convert byte array to stream
Posted by Andrew Inwards at 6/18/2004 11:19:20 AM
Can anyone tell me how to convert a byte array to a stream.? Thanks Andrew ...more >>

String Array Object to an ArrayList
Posted by Jeff Johnson at 6/18/2004 11:13:57 AM
Hi, I've begun converting an ASP site over to .NET and I'm a novice at both the new platform as well as C#. I have a COM+ object that returns a string array when it is called. The size of the array can vary depending on the parameters passed. What I need to do is loop through the returne...more >>

File IO Problem!!!
Posted by Vai2000 at 6/18/2004 10:56:26 AM
Hi All, I had posted a File IO Race condition question sometime back. With all your advice now I am opening a file to check whether a valid File Handle is returned or not? If not then I sleep for sometime and retry it. Problem is when I re open the File I am missing a line? Any Clues? bool IsFil...more >>

Detecting if class is still running constructor
Posted by Pavils Jurjans at 6/18/2004 10:55:51 AM
Hello, I have this class, which has an indexer and some methods, and the constructor of this class makes several calls to them. I would like the code in methods to have different behaviour depending whether the constructor is still running (and current method is called from the constructor), o...more >>

FieldInfo.SetValue()
Posted by Glen at 6/18/2004 10:44:01 AM
FieldInfo.SetValue() doesn't appear to work when trying to set the values of fields of a struct. Why? Because structs are passed by value and not reference? -- Thanks, Glen...more >>

using and return (what do they do under the sheets . . .)
Posted by Robert May at 6/18/2004 10:35:08 AM
Question, Say I have the following: Using(DataSet ds=new DataSet) { ... da.fill(ds) ... return ds; } What happens? Does the using dispose the dataset? Return is supposed to stop execution immediately, correct? Just wondering. Robert ...more >>

Event reference
Posted by jon.m.landenburger NO[at]SPAM verizon.com at 6/18/2004 10:27:33 AM
Anyone know where I can find a good reference info in events? I am learning .net c# with some success but I am slowed down when working with events. Basically I am looking for what triggers particular events. Many are intuitive some are not....more >>

C# Ping ?
Posted by JC at 6/18/2004 10:25:56 AM
I have this code from a site, http://www.csharphelp.com/archives3/archive554.html I can't figure out what the set{ m_Timeout = MinMax.max(value, 1); does. Compiling fails on the MinMax object. What is it? jc ...more >>

Imagelist and bitmaps
Posted by JaguarX at 6/18/2004 10:17:01 AM
Hi, I made an application that displays a ListView that uses an Imagelist. I load the ImageList Control from a database I have no problems when the images are Icons or JPGs (including big sized JPGs). I come to troubles when I try to add a Bitmap (a large bitmap 1024x768 24bpp). Anyone can t...more >>

TextBox / IO
Posted by Paddy at 6/18/2004 9:51:58 AM
I am reading a file like so: using(FileStream inStream = new FileStream ("addresses",FileMode.Open,FileAccess.Read)) { } One of the strings is long and is displayed in a multil;ine textbox. When I do that carriage returns in the multiline text box do not produce the desired result, nei...more >>

Click events in Datagrids
Posted by Brian Conway at 6/18/2004 9:47:38 AM
How can I add a button to a datagrid and put in a click event in it? I have tried using the Property Builder and templates, but cannot get it to work. I think the problem is that it does not know which row is calling the click, but I am not sure how to correct this, to say that this click is com...more >>

Overwriting of Property-Attributes in a Derived Class
Posted by web-accounts NO[at]SPAM gmx.de at 6/18/2004 9:20:07 AM
Hello group, i want to overwrite or manipulate a attribute of a property in a derived class. I use a attribute DBInfo via reflection on my properties to set the parameters in a SQL-statement dynamically. Now in a derived class (similar table in the DB), the name of the column a other one. ...more >>

Import namespace in codebehind
Posted by DaveF at 6/18/2004 8:24:51 AM
How do you do this? -- David ...more >>

References for designing a "Plug-In" software architecture
Posted by Gary James at 6/18/2004 7:57:26 AM
This may not be a direct C# question, but since I'll be using using C# for development, I thought I'd pose the question here. I'll soon be involved in the design of a new software product that will employ a software "Plug-In" architecture. Taking the plug-in route will give us a design that ...more >>

Com - Addin with Excel??
Posted by Eduardo at 6/18/2004 7:39:02 AM
I have a question to the following example: http://msdn.microsoft.com/office/understanding/excel/codesamples/default.aspx?pull=/library/en-us/dnexcl2k2/html/odc_xlnet.asp This example uses an external Add-in that connects an Excel workbook with a C# routine. I tried to make a new workbook wit...more >>

Buttons in Datagrids
Posted by Brian Conway at 6/18/2004 7:34:34 AM
Anyone know if it is possible to have a button inside a datagird that will launch a new window? I have a button on my webform that does this currently and it works fine. I took that code and put a button into the datagrid template and wanted it to do the same thing per line and pass that line ...more >>

Delegates, threads and instance methods
Posted by christopher green at 6/18/2004 7:19:40 AM
Can someone provide me with a simple example as to how to start and stop a thread that calls an instance method? All examples on the web seem to call static methods. Many thanks in advance. *** Sent via Devdex http://www.devdex.com *** Don't just participate in USENET...get rewarded...more >>

problem with string
Posted by kscdavefl at 6/18/2004 5:55:01 AM
I am using the following code to populate a texst box: private string convertstring(string getLD) { Byte[] myBytes13 = {13}; string myStr13 = System.Text.Encoding.ASCII.GetString(myBytes13); Byte[] myBytes10 = {10}; string myStr10 = System.Text.Encoding.ASCII.GetString(myBy...more >>

restoring database using SQLDMO
Posted by Mohammed Abdel-Razzak at 6/18/2004 4:22:36 AM
Dear sirs I`ve used SQLDMO to make a backup to my database How can I use it to restore database? thanks Mohammed...more >>

ListView GetItemAt (e.X, e.Y) method
Posted by Michael C at 6/18/2004 2:54:56 AM
Hi all, When I try to use the GetItemAt (e.X, e.Y) method in a ListView MouseDown() event, it only works some of the time. If I right-click on an open area of the ListView, I get null back as expected. If I right-click on a ListViewItem, I get that ListViewItem back. But then... if I right-...more >>

restoring a database from csharp
Posted by Sherif at 6/18/2004 2:46:02 AM
I'm making an application using csharp to connect to a database made by MSSql Server and i've already done backup for the database from the csharp and i need now to know how can i restore the database back by using csharp code....more >>

Calling several processes in a dos window
Posted by w.monthard at 6/18/2004 2:20:34 AM
Hi, here is my trouble: I need to call 2 différents processes in a same dos window, the first one is needed for the 2nd, and I have to pass several different arguments to the 2nd. My problem is that there are as many dos windows as calls to "myProcess.start()", and I don't know how to do ......more >>

inheritance issue
Posted by Hans De Schrijver at 6/18/2004 1:45:13 AM
I'm trying to do the following: Class1 (= base class) public virtual Method1{} Class2 : Class1 public override Method1 { return base.Method1; //do some more processing specific to Class2 } Class3 : Class2 public override Method1 { return base.Method1...more >>

Item Height on ListView
Posted by Sean at 6/18/2004 1:25:40 AM
Hi all, I wonder if there is a way to make the height of the row of an item in a ListView larger than the default? Any suggestion would be great. Thank you once again! regards, Sean...more >>

What is your favourite .NET namespace?
Posted by UhihaJax at 6/18/2004 1:20:01 AM
I've never had time to catagorically go through them all so I'm just interested in finding out what namespaces people think are cool and why. My favourite is CodeDom, the ability to write code within code is intriguing then link that up with a compiler and you can make your program create another p...more >>

Column on ListView
Posted by Sean at 6/18/2004 1:18:52 AM
Hi all, I wonder if there is a way to prevent user from resizing the last column by moving the last vertical line on a ListView, meaning I don't want user to be able to move the last vertical line and change the width of the last column on a ListView. Any suggestion would be greatly ap...more >>

Class instances help
Posted by Timothy V at 6/18/2004 1:00:20 AM
Hi, I have a problem. How do i create an instance of an unknown derived class? I'll explain more with the following code. abstract class Animal {} sealed class Dog {} sealed class Cat {} Animal GetAnimal(string name) { if (name = "a") return new Dog(); else re...more >>

What data types are SOAP serializable
Posted by xmail123 NO[at]SPAM yahoo.com at 6/18/2004 12:15:53 AM
Hi, As was pointed out whatever you return from a WebMethod needs to be serializable to SOAP. An ArrayList is not serializable. I will be needing to return other data types from web methods. Is there a document, or can some one list those types that are not serializable and the syntax for ...more >>

Determining names of derived classes at runtime
Posted by John Hardin at 6/18/2004 12:10:24 AM
All: Is it possible at runtime to determine the names of all classes derived from a given class? -- John Hardin KA7OHZ <johnh@aproposretail.com> Internal Systems Administrator voice: (425) 672-1304 Apropos Retail Management Systems, Inc. ...more >>

Events disappear in VS.Net 2003
Posted by Rekkie at 6/18/2004 12:00:05 AM
Hi, All of our developers using C# VS.Net 2003 to develop websites are having problems with Events being deleted from their code by Visual Studio. It seems that object events defined in the properties window work for a while during debugging, and after a while visual studio decides that it do...more >>


DevelopmentNow Blog