C# - get command line args
Moderators: chiark

Jump to page : 1
Now viewing page 1 [15 messages per page]

Forums · General Discussion · Developers Arena

SwizzleDude
Posted 2017-03-17 11:31 PM
#

H/PC Philosopher

1001002525


Posts:
268
Member Nº:
32022
Location:
Germany
Status:
I'm writing an image view program in C# for .NET CF, and at the moment I'm trying to implement command line args, so that the program can be associated with image files and can open them upon double clicking.

I've tried String[] args = Environment.GetCommandLineArgs();, but it gives this error: 'System.Environment' does not contain a definition for 'GetCommandLineArgs'

Any thoughts?
 Top of the page
C:Amie
Posted 2017-03-18 3:05 PM
#


Administrator
H/PC Oracle

100002000200010025


Posts:
14148
Member Nº:
1
Location:
Fields End, UK
Status:
What .net Framework are you targeting? You need 1.1 or higher for the Environment namespace; and I assume you've included system.
 Top of the page
SwizzleDude
Posted 2017-03-18 3:16 PM
#

H/PC Philosopher

1001002525


Posts:
268
Member Nº:
32022
Location:
Germany
Status:
Quote
C:Amie - 2017-03-18 3:05 PM

What .net Framework are you targeting? You need 1.1 or higher for the Environment namespace; and I assume you've included system.

I'm targeting 2.0, on VS2005. I have included system
 Top of the page
C:Amie
Posted 2017-03-18 3:25 PM
#


Administrator
H/PC Oracle

100002000200010025


Posts:
14148
Member Nº:
1
Location:
Fields End, UK
Status:
Try refactoring you method
static void Main(string[] args) {}
 Top of the page
hpc:factor« View previous thread · Developers Arena · View next thread »

Jump to page : 1
Now viewing page 1 [15 messages per page]

Jump to forum :
Search this forum
Printer friendly version
E-mail a link to this thread
Seconds to generate: 0.140 - Cached queries : 41 - Executed queries : 27
Server Time now is: Monday, 20 November 2017 - 22:57