Ah. That's what it is. Thanks. --Jekke
-----Original Message----- From: Unmoderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of David L. Penton Sent: Wednesday, October 27, 2004 3:49 PM To: [EMAIL PROTECTED] Subject: Re: [ADVANCED-DOTNET] Depending on what your definition of is is... Jekke, If parameters[0].ParameterType is a System.Type which , then you could do this: if(parameters[0].ParameterType == typeof(System.Xml.XmlNode)) { // code here } hth... -- David L. Penton, Microsoft MVP JCPenney Application Specialist - Lead "Mathematics is music for the mind, and Music is Mathematics for the Soul. - J.S. Bach" Blog @ http://blogs.SqlAdvice.com/dpenton/ Do you have SQL BOL installed? If not, why not? New SP3 SQL BOL: http://www.davidpenton.com/sqlbol ---------- Original Message ----------- From: Jekke Bladt <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Sent: Wed, 27 Oct 2004 15:39:23 -0400 Subject: Re: [ADVANCED-DOTNET] Depending on what your definition of is is... > Unfortunately, parameters[0] is of type ParameterInfo. > > --Jekke > > -----Original Message----- > From: Unmoderated discussion of advanced .NET topics. > [mailto:[EMAIL PROTECTED] On Behalf Of Jerry Dennany > Sent: Wednesday, October 27, 2004 3:34 PM > To: [EMAIL PROTECTED] > Subject: Re: [ADVANCED-DOTNET] Depending on what your definition of is > is... > > Did you try: > > if(parameters[0] is System.Xml.XmlNode) > > You should compare the actual object, not the object type (If I remember > correctly). If I'm wrong, I'm certain that someone can correct me! > > -Jerry Dennany > > -----Original Message----- > From: Unmoderated discussion of advanced .NET topics. > [mailto:[EMAIL PROTECTED] On Behalf Of Jekke Bladt > Sent: Wednesday, October 27, 2004 2:59 PM > To: [EMAIL PROTECTED] > Subject: [ADVANCED-DOTNET] Depending on what your definition of is is... > > I think I'm missing some subtlety regarding the "is" keyword here. > > Here's what the helpfile says about it: > > An is expression evaluates to true if both of the following conditions > are met: > > expression is not null. > expression can be cast to type. That is, a cast expression of the form > (type)(expression) will complete without throwing an exception. For more > information, see 7.6.6 Cast expressions. > > Where I'm getting strangeness is the line: > if(parameters[0].ParameterType is System.Xml.XmlNode) > > Even when the parameter type *is* System.Xml.XmlNode, it evaluates to > false. > > What am I missing? > > TIA > > --Jekke > > =================================== > This list is hosted by DevelopMentor. http://www.develop.com > Some .NET courses you may be interested in: > > Essential .NET: building applications and components with C# > November 29 - December 3, in Los Angeles > http://www.develop.com/courses/edotnet > > View archives and manage your subscription(s) at > http://discuss.develop.com > > =================================== > This list is hosted by DevelopMentor(r) http://www.develop.com > Some .NET courses you may be interested in: > > Essential .NET: building applications and components with C# > November 29 - December 3, in Los Angeles > http://www.develop.com/courses/edotnet > > View archives and manage your subscription(s) at > http://discuss.develop.com > > =================================== > This list is hosted by DevelopMentor(r) http://www.develop.com > Some .NET courses you may be interested in: > > Essential .NET: building applications and components with C# > November 29 - December 3, in Los Angeles > http://www.develop.com/courses/edotnet > > View archives and manage your subscription(s) at http://discuss.develop.com ------- End of Original Message ------- =================================== This list is hosted by DevelopMentor(r) http://www.develop.com Some .NET courses you may be interested in: Essential .NET: building applications and components with C# November 29 - December 3, in Los Angeles http://www.develop.com/courses/edotnet View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentor� http://www.develop.com Some .NET courses you may be interested in: Essential .NET: building applications and components with C# November 29 - December 3, in Los Angeles http://www.develop.com/courses/edotnet View archives and manage your subscription(s) at http://discuss.develop.com
