Calling a Static method in C#

前端 未结 5 1496
[愿得一人]
[愿得一人] 2021-02-19 11:46

How do I call a static method? I want to call this from a class I have created, I want to get the location from IP. I\'ve declared it but what I need to do is call the method...

5条回答
  •  闹比i
    闹比i (楼主)
    2021-02-19 12:15

    You need to do two things:

    1. First, import the library where the static class is: import blabla;

    2. Then, call your static method doing something liked this: LocationTools.GetLocationFromIP(address, city...);

    It should work.

提交回复
热议问题