我是新來的ASP .NET與C#現在我需要解決的一個問題PHP陣列核心價值用C#
我可以創建這樣
$arr[] = array('product_id' => 12, 'process_id' => 23, 'note' => 'This is Note');
//Example
Array
(
[0] => Array
(
[product_id] => 12
[process_id] => 23
[note] => This is Note
)
[1] => Array
(
[product_id] => 5
[process_id] => 19
[note] => Hello
)
[2] => Array
(
[product_id] => 8
[process_id] => 17
[note] => How to Solve this Issue
)
)
我想一個數組使用C#在ASP.NET中創建相同的數組結構。
請幫我解決這個問題。提前致謝。
感謝您的快速回復, 陣列 ( [0] =>數組 ( [PRODUCT_ID] => 12 [process_id] => 23 [注] =>這是註釋 ) [1] =>數組 ( [PRODUCT_ID] => 5 [PROCESS_ID] => 19 [注] =>你好 ) [2] =>數組 ( [PRODUCT_ID] => 8 [PROCESS_ID] => 17 [注] =>如何如果你想這樣做,我會簡單地定義一個類來封裝解決這個問題 ) ) 我想做的事情是這樣的... – rkaartikeyan
你的數據,只是有一個數組或該類的實例列表。喬恩的回答可能暗示了一種匿名類型,這也是一種選擇。 –
肯定先生,這對我很有幫助。 – rkaartikeyan