Here is my code I want to check out file to default changelist.
But I don't know my default changlist ID. How can I get it?
string command = "-c";
string f = filePath;
cmd = new P4Command(p4, "add", true, command, changelist.Id.ToString(), "-f", f);
rslt = cmd.Run();
f = filePath.Replace("@", "%40");
cmd = new P4Command(p4, "edit", true, command, changelist.Id.ToString(), f);
rslt = cmd.Run();
cmd = new P4Command(p4, "reopen", true, command, changelist.Id.ToString(), f);
rslt = cmd.Run();

No need to overcomplicate things -- it's called the "default" because it's literally the default when you don't specify a changelist. The "default changelist" isn't really a changelist; it's just a collection of files open on your client that don't belong to a numbered changelist yet.
I think in terms of your code this is:
Just leave off the "-c" (which stands for "changelist") and the changelist number.
If you need to move a file out of a numbered change and into the default change you can use the
reopencommand as described inp4 help reopen: