monfort monfort - 1 month ago 22
C# Question

How to define a URL in C#

I have something like this

WebRequest request = WebRequest.Create("");

and I want to use something similar to

#define URL @"""
WebRequest request = WebRequest.Create(URL);

How can I do this in C#?


In C#, you use const to declare a constant, as opposed to a #define, like in C.

const string URL = @"";