I am new in C# programming. I want to run my Window Form Application through command line with one argument which is file name to be open in my Application. How can I do the following validation related to argument passed to Application:
- Checking the argument string is valid file path (not a folder path)
- If the argument string is Relative path (like "~\xyz.pdf") then it will generate and validate the absolute path (like "C:\Downloads\xyz.pdf").
- If argument string is valid file path then file should be of specific extension (like file path is valid and it is PDF file only).