F# how to return have value a tuple or null

Posted by mamu on Stack Overflow See other posts from Stack Overflow or by mamu
Published on 2010-06-06T05:44:32Z Indexed on 2010/06/06 5:52 UTC
Read the original article Hit count: 227

Filed under:
    let retVal =
      if reader.Read() then
        (reader.GetString(0), getBytesData reader 1, reader.GetDateTime(2))
      else
        null

F# don't allow null to returned

How can i have value return as a tuple or a null?

© Stack Overflow or respective owner

Related posts about F#