Guest User

Untitled

a guest
Nov 15th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. Result<T> MyFunction()
  2.  
  3. public ParseFailure<TOther> As<TOther>()
  4. {
  5. return new ParseFailure<TOther>(_input, _message, _expectations);
  6. }
  7.  
  8. Result<OldType> firstResult = ...
  9. if (firstResult.Failed) return firstResult.As<NewType>();
  10.  
  11. if (firstResult.Failed) return firstResult;
Add Comment
Please, Sign In to add comment