Question: what is difference between function and sub in vb.net?
Answer: A sub and a function are both subroutines, or sections of code that can be called in the program. The difference between them is that a function has a return value and a sub does not. A class is a group of codes that can include subs, functions, and other stuff.