I need to convert all of the following forms into .NET Uri object:
- "hello.world"
- "..\something\somthing"
- "../something/somthing/else"
- "c:\autoexec.bat"
- "http://whatever.com/nevermind.html"
- more or less anything else that you might expect to find in something building local or web path.
I have already checked an new Uri("..\somthing\something")
and new Uri("../something/somthing/else")
don't work. Also none Uri
's statics seem to be for this.
Any ideas beside a big logic tree and/or regex?