which is why I am asking yet another question.
Apologies to Alex who probably already answered this.
I have this code:
Now when I try to do something like:
I get a compiler error to the effect of no such property 'portname' for iLinkable. I am expecting it to resolve ISLs(1) to the fibreport object stored there.
but this works:
So why does first not work but second does and how do I get first to work? This has implications for other stuff I am trying to do. Google's got nothin'. Well I'm sure it has something, but I can't find it.
Apologies to Alex who probably already answered this.
I have this code:
Code:
public Interface iLinkable
end interface
public class fibreport
implements iLinkable
Dim portname As string
end class
public class ethernet
implements iLinkable
Dim portname As string
end class
public class fabric
Dim ISLs As iLinkable()
'tests the iLinkable interface
sub tester
Redim ISLs(2)
ISLs(1) = new fibreport
ISLs(2) = new ethernet
end sub
Code:
ISLs(1).portname = "tester"
but this works:
Code:
Dim newport As fibreport = ISLs(1) fibreport.portname = "tester"

Comment