ProtekNickz
Member
- Joined
- Jan 13, 2022
- Messages
- 14
- Programming Experience
- 5-10
Hi, I have Googled until my eyes bleed , I have two programs I'm working on, One is a Desktop Forms Application and the other is a Console Application, I'm trying to pass a string to the console app as an argument which is got from the Desktop Application from is
When I send this string to the Console Application the first four arguments are accepted fine, but when it reaches the MyFileDialog.FileName, Example which should look like "C:\Program Files\My Application\Application Name.exe" from the MyFileDialog.FileName, but when it sends the string to the Console Application it only comes in to the argument[0] like "C:\Program Files\My" as it dismisses the rest after the white spaces, basically it trunacats my string, I've tried various things like ' some String ' and "' Some string '" or even @" some string ", I'm thinking its on the Console Applications side due to the arguments, if so how can i send a string to a Console Argument with spaces in it from a OpenFileDialog box?.
Cheers in advance ProtekNickz!
Strings:
MyStrings = "Block" + " " + _RuleName + " " + __Description + " " + _RemoteAddress + " " + MyFileDialog.FileName;
When I send this string to the Console Application the first four arguments are accepted fine, but when it reaches the MyFileDialog.FileName, Example which should look like "C:\Program Files\My Application\Application Name.exe" from the MyFileDialog.FileName, but when it sends the string to the Console Application it only comes in to the argument[0] like "C:\Program Files\My" as it dismisses the rest after the white spaces, basically it trunacats my string, I've tried various things like ' some String ' and "' Some string '" or even @" some string ", I'm thinking its on the Console Applications side due to the arguments, if so how can i send a string to a Console Argument with spaces in it from a OpenFileDialog box?.
Cheers in advance ProtekNickz!