读书人

异常5“Public ReadOnly Property Rig

发布时间: 2012-09-01 09:33:02 作者: rapoo

错误5“Public ReadOnly Property Right() As Integer”没有任何参数,并且无法对它的返回类型进行索引。?
这个判断文件路径末位是不是"\"的代码,应该没错的啊,而且我在同一个项目别的地方也用right函数都没错的.

VB.NET code
Public Function SearchFileInPath(ByVal thePath As String, ByVal theFileName As String, Optional ByVal mStop As Boolean = False) As String()        If Right(thePath, 1) <> "\" Then thePath = thePath & "\"'这里的Right函数波浪线报错:错误    5    “Public ReadOnly Property Right() As Integer”没有任何参数,并且无法对它的返回类型进行索引。        Call GetFileLoop(thePath, theFileName, mStop)        SearchFileInPath = FoundFile    End Function

求大侠们帮看下.感谢!!

[解决办法]
改成strings.right就行了

读书人网 >VB

热点推荐