Option Strict On - בעייה בהמרה
שלום לכולם, הוספתי בראש העמוד כאן: Option Strict On Option Explicit On ומאז לא ניתן לעשות BUILD - אני מקבל את ההערה: D:\www\mysite\Components\CommonUtils.VB(23): Option Strict On disallows late binding. השורה הבעייתית: CStr(Trim(LCase(arrFileType(1))) כל הקוד:
שלום לכולם, הוספתי בראש העמוד כאן: Option Strict On Option Explicit On ומאז לא ניתן לעשות BUILD - אני מקבל את ההערה: D:\www\mysite\Components\CommonUtils.VB(23): Option Strict On disallows late binding. השורה הבעייתית: CStr(Trim(LCase(arrFileType(1))) כל הקוד:
'use this function to make sure user uploads only valid image file types Public Function ValidFileType(ByVal filename As String) As Boolean Dim arrFileType As Array = Split(LCase(filename), ".") Dim blnValid As Boolean = False If UBound(arrFileType) > 0 Then Dim arrValidFiles() As String = {"jpg", "jpeg", "gif"} Dim stritem As String For Each stritem In arrValidFiles If CStr(Trim(LCase(arrFileType(1)))) = CStr(Trim(LCase(stritem))) Then blnValid = True End If Next End If Return blnValid End Function
אשמח מאוד אם משהו יוכל לעזור בעניין. תודה