Click here to Skip to main content
15,923,083 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Remote Login Pin
UniBond31-Mar-05 7:07
UniBond31-Mar-05 7:07 
GeneralRe: Remote Login Pin
Dave Kreskowiak31-Mar-05 9:02
mveDave Kreskowiak31-Mar-05 9:02 
GeneralRe: Remote Login Pin
UniBond31-Mar-05 21:11
UniBond31-Mar-05 21:11 
GeneralRe: Remote Login Pin
Colin Angus Mackay2-Apr-05 6:15
Colin Angus Mackay2-Apr-05 6:15 
GeneralRe: Remote Login Pin
J4amieC31-Mar-05 20:53
J4amieC31-Mar-05 20:53 
GeneralRe: Remote Login Pin
Dave Kreskowiak1-Apr-05 2:10
mveDave Kreskowiak1-Apr-05 2:10 
GeneralRe: Remote Login Pin
J4amieC1-Apr-05 2:24
J4amieC1-Apr-05 2:24 
GeneralCasting from XmlNode to an inherited calss from XmlElement Pin
Parham.G31-Mar-05 1:31
Parham.G31-Mar-05 1:31 
Hello,
I have an inherited class from XmlElement with this name: XmlElementCF
I have added a function in XmlElementCF that returns a XmlNode.
I can cast the a node with the type od Element to XmlElement but
can not cast the node to XmlElementCF, I am getting an error
: Specified cast is not valid.


Here is my drived class:

<br />
Imports System.Xml<br />
Public Class XmlElementCF<br />
    Inherits System.Xml.XmlElement<br />
<br />
    Public Sub New(ByVal prefix As String, ByVal localName As String, ByVal namespaceUri As String, ByVal doc As System.xml.XmlDocument)<br />
        MyBase.New(prefix, localName, namespaceUri, doc)<br />
<br />
    End Sub<br />
<br />
    Public Function GetFirstElementByTagName(ByVal name As String) As XmlNode<br />
        Return Me.GetElementsByTagName(name)(0)<br />
<br />
    End Function<br />
End Class<br />


and then:

<br />
Dim xDoc As New XmlDocument<br />
xDoc.LoadXml("<?xml version=""1.0""?><xml><ChoiceSet ChoiceSetID=""9""><Choice ChoiceID=""31"" /><Choice ChoiceID=""30"" /></ChoiceSet></xml>")<br />
<br />
Dim xElmnt As XmlElement = xDoc.SelectSingleNode("//ChoiceSet") 'There is no problem here<br />
Dim xElmntCF As XmlElementCF = xDoc.SelectSingleNode("//ChoiceSet") 'But here i am getting :Specified cast is not valid :(<br />
Dim xmlElmntCh As XmlElementCF = xElmntCF.GetFirstElementByTagName("Choice")<br />


Please Help
Thanks
Generalvb.net-web applications Pin
aditi171031-Mar-05 1:21
aditi171031-Mar-05 1:21 
GeneralRe: vb.net-web applications Pin
Dave Kreskowiak31-Mar-05 2:20
mveDave Kreskowiak31-Mar-05 2:20 
GeneralRe: vb.net-web applications Pin
aditi171031-Mar-05 17:09
aditi171031-Mar-05 17:09 
GeneralRe: vb.net-web applications Pin
Dave Kreskowiak1-Apr-05 2:09
mveDave Kreskowiak1-Apr-05 2:09 
GeneralVB.NET projects and exercises Pin
gyaradoz30-Mar-05 23:28
gyaradoz30-Mar-05 23:28 
GeneralRe: VB.NET projects and exercises Pin
Dave Kreskowiak31-Mar-05 2:19
mveDave Kreskowiak31-Mar-05 2:19 
Generalc,c++ Pin
vjayakumar30-Mar-05 21:35
vjayakumar30-Mar-05 21:35 
GeneralRe: c,c++ Pin
Dave Kreskowiak31-Mar-05 2:18
mveDave Kreskowiak31-Mar-05 2:18 
GeneralRe: c,c++ Pin
Colin Angus Mackay31-Mar-05 4:37
Colin Angus Mackay31-Mar-05 4:37 
GeneralRe: c,c++ Pin
Dave Kreskowiak31-Mar-05 5:44
mveDave Kreskowiak31-Mar-05 5:44 
Generalpropertygrid Pin
ingwaar30-Mar-05 19:32
ingwaar30-Mar-05 19:32 
Generalbug on .net framework or... Pin
Member 73061930-Mar-05 19:21
Member 73061930-Mar-05 19:21 
GeneralRe: bug on .net framework or... Pin
Christian Graus31-Mar-05 13:31
protectorChristian Graus31-Mar-05 13:31 
GeneralGetting Exception while importing excel file and creating table with it! Pin
nupur_j30-Mar-05 19:19
nupur_j30-Mar-05 19:19 
GeneralHelp writing a function Pin
THerman30-Mar-05 17:07
THerman30-Mar-05 17:07 
GeneralRe: Help writing a function Pin
rwestgraham30-Mar-05 17:40
rwestgraham30-Mar-05 17:40 
GeneralRe: Help writing a function Pin
THerman31-Mar-05 3:08
THerman31-Mar-05 3:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.