Skip to content

Commit 9f2b315

Browse files
committed
change C# example to get environment variable
1 parent 675103a commit 9f2b315

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

articles/azure-web-pubsub/quickstart-use-client-sdk.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ Edit the `Program.cs` file and add following code:
157157
```csharp
158158
using Azure.Messaging.WebPubSub.Clients;
159159
// Client Access URL from Azure portal
160-
var clientURL = args[0];
160+
var clientURL = Environment.GetEnvironmentVariable("WebPubSubClientURL"));
161161
// Instantiates the client object.
162162
var client = new WebPubSubClient(new Uri(clientURL));
163163
```
@@ -234,7 +234,7 @@ Run the client in your terminal. To verify the client is sending and receiving
234234

235235
# [JavaScript](#tab/javascript)
236236

237-
To start the client go the terminal and run the following command. Replace the `<Client Access URL>` with the Client Access URL you copied from the portal.
237+
To start the client go the terminal and run the following command. Replace the `<Client Access URL>` with the client access URL you copied from the portal.
238238

239239
```bash
240240
export WebPubSubClientURL="<Client Access URL>"
@@ -243,9 +243,10 @@ node index.js
243243

244244
# [C#](#tab/csharp)
245245

246-
To start the client, run the following command in your terminal replacing the `<client-access-url>` with the Client Access URL you copied from the portal:
246+
To start the client, run the following command in your terminal replacing the `<client-access-url>` with the client access URL you copied from the portal:
247247

248248
```bash
249+
export WebPubSubClientURL="<Client Access URL>"
249250
dotnet run <client-access-url>
250251
```
251252

0 commit comments

Comments
 (0)