monfort monfort - 5 months ago 64
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 = @"";