vb.net - Why this sub is valid? Why i can pass each Type (String, Interface, Int) to a sub without compiler error as parameter -


public class mainwindow      private sub mainwindow_loaded(sender object, e routedeventargs) handles me.loaded          me.x(1)     end sub      public sub x(byval x string)         messagebox.show(x)     end sub  end class 

if want interface in sub x example public sub x(byval iperson) accept every type without error.

in vs2013 under debug/debugging/projects , solutions/vb defaults option turn option strict on.


Comments

Popular posts from this blog

c# - How can I have the VS Debugger break in the correct location for exceptions thrown in Async methods in a Console App? -

php - Issues outputting data after prepared statement with loops -

javascript - How to pass a property by reference -