C# 實(shí)例 Array 數(shù)組
c# 實(shí)例
array 數(shù)組
@{
string[] members = {"jani", "hege", "kai", "jim"};
int i = array.indexof(members, "kai")+1;
int len = members.length;
string x = members[2-1];
}
<html>
<body>
<h3>members</h3>
@foreach (var person in members)
{
<p>@person</p>
}
<p>the number of names in members are @len</p>
<p>the person at position 2 is @x</p>
<p>kai is now in position @i</p>
</body>
</html>
相關(guān)文章
- ASP.NET Web Pages 教程
- ASP.NET Web Pages Razor
- ASP.NET WebPages 幫助器參考手冊(cè)
- ASP.NET Razor C# 邏輯
- ASP.NET Razor VB 循環(huán)和數(shù)組
- ASP.NET MVC 文件夾
- ASP.NET MVC 安全
- ASP.NET Web Forms 教程
- ASP.NET Web 頁面
- ASP.NET 導(dǎo)航
- ASP.NET CheckBox 控件
- ASP.NET HyperLink 控件
- ASP.NET PlaceHolder 控件
- ASP.NET Style 控件
- HTML Anchor
- HTML Textarea
- ASP.NET HTML 控件 Hyperlink
- ASP.NET HTML 控件 linkbutton
- ASP.NET HTML 控件 Repeater
- ASP.NET HTML 控件 XML RadiobuttonList