Here I can use either of these 2 methods. What are the differences and which one should I use?
Method 1:
string srUserIp = \"\";
There is no difference. They return exactly the same value. However, one is IntelliSense-friendly whereas the other is not.