455 16

Return Multiple Type Values from a Function

Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
Structure MyResults Public Success As Boolean Public Result As String End Structure Public Function TrySomething(ByVal Parameter As String) As MyResults Dim NewResult As New MyResults Try ' Do something and calculate My Result NewResult.Success=True NewResult.Result="My Result" Catch ex As Exception NewResult.Success=False NewResult.Result="" End Try Return NewResult End Function
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus