This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Web.Routing; | |
| using Microsoft.AspNet.FriendlyUrls; // <- 追加 | |
| namespace FriendlyURLsSample | |
| { | |
| public class Global : System.Web.HttpApplication | |
| { | |
| protected void Application_Start(object sender, EventArgs e) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var salesOfCustomers = source.GroupBy(x => x.Customer); | |
| foreach (var salesOfCustomer in salesOfCustomers) | |
| { | |
| var salesOfProducts = salesOfCustomer.GroupBy(x => (x.Product)); | |
| foreach (var salesOfProduct in salesOfProducts) | |
| { | |
| foreach (var sales in salesOfProduct) | |
| { | |
| Console.WriteLine(sales); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var oldCustomer = ""; | |
| var newCustomer = ""; | |
| var oldProduct = ""; | |
| var newProduct = ""; | |
| var totalQuantity = 0L; | |
| var totalPrice = 0m; | |
| var totalCustomerQuantity = 0L; | |
| var totalCustomerPrice = 0m; | |
| var totalProductQuantity = 0L; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var q = from i in Enumerable.Range(1, 100) | |
| from j in Enumerable.Range(1, 100) | |
| from k in Enumerable.Range(1, 10) | |
| select new Sales | |
| { | |
| Customer = string.Format("取引先{0:d2}", i), | |
| Product = string.Format("商品{0:d2}", j), | |
| UnitPrice = Convert.ToDecimal(j * 100), | |
| Quantity = k | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Diagnostics; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace ConsoleApplication1 | |
| { | |
| class Program |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using Microsoft.VisualStudio.TestTools.UnitTesting; | |
| namespace TddAdventJp2013.Test | |
| { | |
| public partial class partialクラス | |
| { | |
| [TestCategory("Aがa2の場合")] | |
| [TestMethod] | |
| public void Bがb1ならばc3となる() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using Microsoft.VisualStudio.TestTools.UnitTesting; | |
| namespace TddAdventJp2013.Test | |
| { | |
| public partial class partialクラス | |
| { | |
| [TestCategory("Aがa1の場合")] | |
| [TestMethod] | |
| public void Bがb1ならばc1となる() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using Microsoft.VisualStudio.TestTools.UnitTesting; | |
| namespace TddAdventJp2013.Test | |
| { | |
| [TestClass] | |
| public partial class partialクラス | |
| { | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using Microsoft.VisualStudio.TestTools.UnitTesting; | |
| namespace TddAdventJp2013.Test | |
| { | |
| public class 内部クラス | |
| { | |
| [TestClass] | |
| public class Aがa1の場合 | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using Microsoft.VisualStudio.TestTools.UnitTesting; | |
| namespace TddAdventJp2013.Test | |
| { | |
| [TestClass] | |
| public class カテゴリー | |
| { | |
| [TestCategory("Aがa1の場合")] | |
| [TestMethod] |