---
title: "Is there a method to get command line arguments in VB.NET?"  
description: "Is there a method to get command line arguments in VB.NET?"  
author: "Shiro Misra"  
published: 2010-09-29  
updated: 2010-09-30  
canonical: https://www.mindstick.com/forum/10/is-there-a-method-to-get-command-line-arguments-in-vb-dot-net  
category: "vb.net"  
tags: ["vb.net"]  
reading_time: 1 minute  

---

# Is there a method to get command line arguments in VB.NET?

Is there a [method](https://www.mindstick.com/forum/166/webservice-method) to get [command](https://www.mindstick.com/blog/178/synchronous-and-asynchronous-command-execution-in-c-sharp-dot-net) [line arguments](https://www.mindstick.com/forum/158085/how-do-i-pass-command-line-arguments-to-a-node-js-program) in [VB.NET](https://www.mindstick.com/forum/426/sqlsever-2000-in-network-with-vb-dot-net-2008)? Please provide a [sample](https://www.mindstick.com/news/2174/mars-mission-by-nasa-prepares-for-tests) of retreiving command line parametes.

## Replies

### Reply by Amit Singh

write this code to get the command line argument\

```
Shared Sub Main(ByVal args As String())
    For Each arg As String In args
        Console.WriteLine(arg)
    Next arg
     Console.ReadLine()
End Sub
```


---

Original Source: https://www.mindstick.com/forum/10/is-there-a-method-to-get-command-line-arguments-in-vb-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
