Thanks,
TreyA struct type is a "value type" so it is not an object ( reference type ).
Sam
so say i have a sub like:
sub insertX( byVal someValue as ___________)end sub
What goes in the ___________ part.
Thanks,
Trey
You would pass it the name of the struct you created. Say you create a struct called Employee, here is how you would pass it:
sub insertX( byVal someValue as Employee a)
//Do stuff with a
end sub
Sam
The ____ will be the structure type:
<%@. Page Language="VB" %>
<html>
<head>
<script runat="server">
Structure Favourite
Public Colour As String
Public Number As Integer
End StructureSub Page_Load(sender As Object, e As EventArgs)
Dim MyFavourite As New Favourite
MyFavourite.Colour = "black"
Myfavourite.Number = "10"
Report( MyFavourite )
End SubSub Report( ThisFavourite As Favourite )
Message.Text = "Your favourite colour is " & ThisFavourite.Colour
Message.Text &= ", and your favourite number is " & ThisFavourite.Number.ToString()
End Sub
</script>
</head>
<body>
<form runat="server">
<asp:Label id="Message" runat="server" />
</form>
</body>
</html>
thanks....that helped me figure out what i was doing wrong.
Trey
0 comments:
Post a Comment