コード例 #1
0
 static void Main(string[] args)
 {
     //Create a Banjo!
     var myFirstBanjo = new Banjo("it's my first!", 4, 67, Banjo.BanjoState.Used);
     //Oh no! The above line didn't work because I can't access BanjoState!
     //I can't used the enum to pass in the value because it's private to the
     //Banjo class. THAT is why the error was visible in the constructor.
     //Visual Studio knew this would happen!
 }
コード例 #2
0
 public Banjo Add([FromBody] Banjo banjo)
 {
     return(banjo);
 }