Command Line
C#
2
Posts
2
Posters
0
Views
1
Watching
-
can you tell me how to pass a integer command line parameter in C# I am struggling with this Please let me know at the earliest Praveen
-
can you tell me how to pass a integer command line parameter in C# I am struggling with this Please let me know at the earliest Praveen
Only strings can be passed, hence an
string[]
array being passed to your entry point method (typicallyMain
) orEnvironment.GetCommadLineArgs()
returning astring[]
. Therefore, you should be looking for a way to convert the string. There are many ways to do this, such asInt32.Parse
andConvert.ToInt32(String)
.Microsoft MVP, Visual C# My Articles