我正在使用Google Place API获取两个城市之间的距离,但是当我通过http://maps.googleapis.com/maps/api/distancematrix/json?origins=dehli&destinations=pune&mode=bicycling&language=en-EN&sensor调用该服务时= true&key = AppKey服务提供此响应:
{
"destination_addresses": [ ],
"error_message": "Requests to this API must be over SSL.",
"origin_addresses": [ ],
"rows": [ ],
"status": "REQUEST_DENIED"
}
Run Code Online (Sandbox Code Playgroud)
这个问题的解决方案是什么?
我有2个.cs文件,每个文件都有一个类.如何从Form2.cs中另一个类的Form1.cs中调用类中的方法?
看起来像这样......
Form1.cs
public partial class Class1 : ClassContainer
{
public void awesomeMethod()
{
}
}
Form2.cs
class Class2 : SomethingChanged
{
public void decentMethod()
{
}
}
Run Code Online (Sandbox Code Playgroud)
我想在decentMethod()中调用awesomeMethod().谢谢.
今天我在C#工作并试图抓住一个FileNotFoundException.但是在我补充之前我无法这样做using System.IO.
为什么FileNotFoundException包含在System.IO命名空间中而不包含在命名System空间中?
据我所知,这FileNotFoundException只会是由IO造成的,因此也许是原因.但另一方面,不应该都Exception在System名称空间中?