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

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -