option strict

Results 1 to 2 of 2

Thread: option strict

  1. #1
    Join Date
    Dec 1969

    Default option strict

    This is my code:<BR><BR>Public Function HandleRawResult(strRawResult as String) as ArrayList<BR><BR>Dim ArrRawResult as ArrayList = New ArrayList()<BR>ArrRawResult.AddRange(strRawResult. Split(ControlChars.CrLf))<BR>Return ArrRawResult<BR><BR>End Function<BR><BR>For my above code I have got my Option Strict On and I get the following error message, <BR>"Option Strict disallows implicit conversions from string to char"<BR><BR>How can I work around this error? I dont want to remove my Option Strict. I used Split(strRawResult, ControlChars.CrLf) function and it works perfectly fine. What makes this split function different?<BR><BR>please let me know.

  2. #2
    Join Date
    Dec 1969

    Default RE: option strict

    I believe you have to cast it using CType to get rid of those error messages. I&#039;m not 100% certain, though, I&#039;m afraid, since I use C# 99% of the time. Hope this helps, though.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts