Some public methods can not be called

Example:
System.IO.Directory has 2 CreateDirectory:

public static DirectoryInfo CreateDirectory(string path);
public static DirectoryInfo CreateDirectory(string path, DirectorySecurity directorySecurity);

when i called the second method, Unity told me:

error CS1501: No overload for method CreateDirectory takes 2 arguments

Why is that?

Is there a way to know what method can not be called even if it is public?

(I need to generate auto-call code by reflection)

You can’t use the second method if you have set the api compatibility level to .NET 2.0 subset. Switch to .NET 2.0 and it should be there.

http://docs.unity3d.com/412/Documentation/ScriptReference/MonoCompatibility.html