現在、私はTrelloNetと協力して自分自身のTrelloオーガナイザアプリケーションを開発しています。次に示すコードのツーピース(「XXXXは」プライバシーの目的のためにマスクされ、自分自身の認証コードとアプリケーションキーである)で開始:Trelloを使用しているときに "NullReferenceExceptionが処理されていませんでした"例外が発生しました
using System;
using TrelloNet;
class Program
{
static void Main(string[] args)
{
ITrello trello = new Trello("xxxx");
trello.Authorize("xxxx");
var myBoard = trello.Boards.Add("My Board");
}
}
このコードは働いていた、 『マイ会』ボードが正常に追加されました。 しかし、わずかに修正された2番目のコードが例外を満たしました。実行後
using System;
using TrelloNet;
class Program
{
static void Main(string[] args)
{
ITrello trello = new Trello("xxxx");
trello.Authorize("xxxx");
Member me = trello.Members.Me();
Console.WriteLine(me.FullName); //exception poped up here.
}
}
、ラインConsole.WriteLine(me.FullName);
で実施poped例外が来て、例外が
NullReferenceException was unhandled
です。An unhandled exception of type 'System.NullReferenceException' occurred in TrelloOrganizer.exe Additional information: Object reference not set to an instance of an object.
オブジェクトtrelloが実際にオブジェクトのインスタンスである、なぜ私はこの例外を取得したのですか?
おかげ
参照:http://stackoverflow.com/questions/29967865/trello-c-sharp-api-boards-withid-and-members-me-are-always-null参照を更新するとこれが解決される可能性があります。 –
どうもありがとうございます。 –