Reputation: 1169
I know this may sound like a dumb question but I got to know since I have been trying to find an answer but can't find any. I noticed that in some functions, after the parentheses, the function is assigned a type? For example
Public Function getConn(ByVal AppId As String, ByVal TranId As String)
As String
and it returns a value call sRet
After the parentheses, why is there an "As String"?
Upvotes: 1
Views: 54
Reputation: 10790
It's defining the return type.
If you did something like
connection = getConn("1", "2")
then connection would be a string, that probably contains the connection string.
You can do other return types as well, such as Int, Float etc.
Upvotes: 4