Re: [DOTNET] What is the correct way to test for Is Nothing in C#?

2002-05-04 Thread Ed Stegman
Your inclination is correct, and you have nothing to worry about wrt objects overriding == and tests for null references. "!= null" and "== null" are syntactic sugar. No methods are invoked on any object for these particular tests, as you are just testing whether the address stored in the xyz v

[DOTNET] PreRender XML issue

2002-05-04 Thread Farhan
I am generating XML document using ASP.NET (VB.nET) but problem is that first line in asp.net page is: <%@ Page Language="vb" AutoEventWireup="false" Codebehind="result.aspx.vb" Inherits="VocalMapPoint.result"%> and i get syntax error because of that, now i know i need to do prerender and insert

Re: [DOTNET] Slow serialization

2002-05-04 Thread Axel Heitland
Some additional information. I'm using a binary formatter not a soap/xml formatter so array optimization should be possible. Thinking this I tried to use a single dim array like "short [] x = new short[512*512]" and that gives very good results. Something about 4,5 ms per array, but

Re: [DOTNET] Slow serialization

2002-05-04 Thread Axel Heitland
Hmm - do you mean that serializing this [Serializable] class MyImage { public short[,] x= new short[512,512]; } results in serializing 256K shorts piece by piece? No array optimizations here? Looking at the SerializationInfo I can't find explicit

[DOTNET] Schrodininger's Enum

2002-05-04 Thread Ray Heath
Visual Studio MSDN Help Wrote: "An Enum is a named constant whose underlying type is any integral type except Char. If no underlying type is explicitly declared, Int32 is used. Enum DERIVES FROM VALUETYPE, BUT IS NOT A VALUE TYPE. Programming languages typically provide syntax to declare an enume

Re: [DOTNET] Slow serialization

2002-05-04 Thread Shawn Wildermuth
I am impressed that it is marshaling it in 250ms. You have up to 1/4 million shorts. I might make it faster if I wrote the SerializationInfo prepended with the length of each of these dimensions and only marshal what's required. But that is just the first idea off the top of my head. Thanks,

[DOTNET] Slow serialization

2002-05-04 Thread Axel Heitland
Hi all, I have a class that mainly contains a short[512,512] array and I'd like that class to be value marshalled via .net remoting. Unfortunately the serialization of such an element takes about 250ms on my box - that's quite long isn't it?! Is there any way to tune the performance? I tried to

Re: [DOTNET] What is the correct way to test for Is Nothing in C#?

2002-05-04 Thread Shawn Wildermuth
First of all, you can't overload the != directly, only == (you get != from the == operation). Second, I would say: if (xyz != null) Or if (!(xys == null)) Both are equivalent since you can only overload the == operator (of course the second one is just plain ugly I wouldn't really use it exce

Re: [DOTNET] Does C# support default/optional method parameter

2002-05-04 Thread Shawn Wildermuth
Overloading, no optional or defaulting. E.g. This: void foo() {foo("defaulted", 10);} void foo(string s) {foo(s, 10);} void foo(string, int i) {} Thanks, Shawn Wildermuth [EMAIL PROTECTED] > -Original Message- > From: dotnet discussion [mailto:[EMAIL PROTECTED]] > On Behalf Of David

[DOTNET] What is the correct way to test for Is Nothing in C#?

2002-05-04 Thread David Ferguson
In VB I would say... if (Not xyz Is Nothing) In C# I am inclined to say... if (xyz != null) but I am concerned that an object might override operator !=. What is the recommended way to do this test in C#? Thanks...David You can read messages from the DOTNET archive, unsubscribe fro

[DOTNET] Does C# support default/optional method parameter

2002-05-04 Thread David Ferguson
If not what is the accepted idiom for handling this? Thanks...David You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.

Re: [DOTNET] C# XML using NetworkStream Question

2002-05-04 Thread James Texter
I have encountered the same situation you described, where the XmlTextReader.Read() method never returns until the client dies. Did you ever find a solution to this? If so, what was it? Thanks, James You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other

[DOTNET] Help: SN.EXE internal error

2002-05-04 Thread David Ferguson
This is what I get when I run SN.EXE D:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Bin>sn -k mykey.snk Microsoft (R) .NET Framework Strong Name Utility Version 1.0.3705.0 Copyright (C) Microsoft Corporation 1998-2001. All rights reserved. Failed to generate a stron

Re: [DOTNET] DNS servers

2002-05-04 Thread Willy Denoyette
One option is to use the Management classes and WMI. Here's a sample.. using System.Management; ... ManagementObjectSearcher query = new ManagementObjectSearcher("SELECT * FROM Win32_NetworkAdapterConfiguration ") ; ManagementObjectCollection queryCollection = query.Get(); foreach( Manageme

Re: [DOTNET] DNS servers

2002-05-04 Thread Deepak Rao
You can use the System.Management classes to get this info from the Win32_NetworkAdapterConfiguration WMI class > -Original Message- > From: dotnet discussion [mailto:[EMAIL PROTECTED]] On Behalf Of > dave wanta > Sent: Saturday, May 04, 2002 10:52 AM > To: [EMAIL PROTECTED] > Subject: [D

[DOTNET] OT: MSDN subscriber login down?

2002-05-04 Thread Reggie Burnett
I keep getting a passport error when trying to login to MSDN subscriber downloads. Anyone else getting that? Reggie You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.

Re: [DOTNET] Button click event doesn't fire if added programmcti ally - URGENT

2002-05-04 Thread Bill Schmidt
George, If Manel's post answered your question, good. However, in the future, please remember that this is a general .NET forum. When you ask a question of this type, it is important to specify VB or C#, and WinForms or ASP.NET. For some questions, it is also necessary to specify your .NET ver

[DOTNET] DNS servers

2002-05-04 Thread dave wanta
hi all, Does anyone know how to retrieve the list of DNS servers that come up when you call the command ipconfig /all ? I need to do this in .NET, without calling any other programs (cmd.exe or ipconfig.exe). Thanks, dave You can read messages from the DOTNET archive, unsubscribe from DOTNET

Re: [DOTNET] ANN: GPL MySQL Driver for ADO.Net

2002-05-04 Thread Reggie Burnett
This one uses PInvoke and is dependent on the mysql libraries. Mine is pure C# and is a native ADO.net data provider. Thanks though! > -Original Message- > From: dotnet discussion [mailto:[EMAIL PROTECTED]]On Behalf Of > Richard Birkby > Sent: Saturday, May 04, 2002 1:50 AM > To: [EMAIL

[DOTNET] wsdl question

2002-05-04 Thread John Burkhardt
It looks like wsdl supports something like a union, using (in fact wsdl schema uses it): I've tried to define something like this in my wsdl and I'm getting the following error when I try to build the wrapper c

Re: [DOTNET] ANN: GPL MySQL Driver for ADO.Net

2002-05-04 Thread Reggie Burnett
Yes I know about that one but I really wanted to do an open source driver under the GPL. That is why I wrote this one and released it > -Original Message- > From: dotnet discussion [mailto:[EMAIL PROTECTED]]On Behalf Of > Beauchemin, Bob > Sent: Saturday, May 04, 2002 1:07 AM > To: [EMAI

[DOTNET] Disabling Refresh with the WebBrowser Ax Control

2002-05-04 Thread Peter Stephens
Hi Netters, I am hosting Internet Explorer using the WebBrowser ActiveX control. I made my own custom AxHost subclass and have setup by hand the IWebBrowser, IHTMLDocument2, DWebBrowserEvents2, and IHTMLElement interfaces. This all works and I can display web pages in my control with no problem.

[DOTNET] Strategy for overriding Equals

2002-05-04 Thread John Burkhardt
>From my understanding of Richter's book (Applied MS .NET Framework Programming) implementing Equals for a type is tricky. The issue is that System.Object.Equals is implemented essentially as ReferenceEquals. If you derive from a class, and override Equals you have to take great care deciding on

Re: [DOTNET] Button click event doesn't fire if added programmcti ally - URGENT

2002-05-04 Thread george antony
Thanks a lot . --- "Serra, Manel" <[EMAIL PROTECTED]> wrote: > Have you added the event handler for the new > generated button? > > (VB snippet) > > AddHandler NewButtonJustCreated.Click, AddressOf > TheMethodThatHandlesTheEvent > > -Original Message- > From: george antony [mailto:[EMAIL P

Re: [DOTNET] Button click event doesn't fire if added programmcti ally - URGENT

2002-05-04 Thread Serra, Manel
Have you added the event handler for the new generated button? (VB snippet) AddHandler NewButtonJustCreated.Click, AddressOf TheMethodThatHandlesTheEvent -Original Message- From: george antony [mailto:[EMAIL PROTECTED]] Sent: Saturday, May 04, 2002 12:22 PM To: [EMAIL PROTECTED] Subject

[DOTNET] Button click event doesn't fire if added programmctially - URGENT

2002-05-04 Thread george antony
Hi all The button click event doesn't fire when I add the button programmatically .. but I have to add the button dynamically according to my requirements.. why is this happening? how do I overcome this ? Urgent .. Pls help thanks George __ Do Yo