ממליץ לך להשתמש גם ב option strict
מצב זה מונע ממך לבצע שני דברים: 1.implicit conversion שעלול לגרום לאיבוד נתונים, או המרה של מספרים למחרוזות (במילים אחרות המרה 'סמוייה'-ללא שימוש באופרטור או method מתאים). 2. שימוש ב late binding, כלומר הגדרת טיפוס מסוג אובייקט (object) הפתרון ל 1 הוא שימוש באופרטור או ב method מתאים לביצוע ההמרה, כלומר explicit conversion. הפתרון ל 2 הוא תמיד להגדיר משתנים מטיפוס מסויים ולא object, אלא אם כן אין ברירה, ואז חייבים לבטל את ה option strict. אם תשתמשי ב option strict on תקבלי שגיאת קומפילציה במצבים הללו. לדוגמא:
Dim i As Integer Dim j As Double Dim str As String Dim obj As Object j = 1.2 i = j 'build error:Option Strict On disallows implicit conversions from 'Double' to 'Integer'. i = CType(j, Integer) 'ok:explicit conversion from double to integer i = CInt(j) 'ok:the same as the above line using CInt method str = j 'build error:Option Strict On disallows implicit conversions from 'Double' to 'String'. str = CType(j, String) 'ok:explicit conversion from double to string str = CStr(j) 'ok:the same as the above line using CStr method str = j.ToString() 'ok:the same as the above line using ToString method obj.mehod1() 'build error:Option Strict On disallows late binding.