直近でメンテナンスされていないため、Internet Explorer 以降のWebブラウザでの動作に不安定さがあります。
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<meta charset="utf-8" />
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCSharp.js"></script>
<link href="syntaxhighlighter/styles/shCore.css" rel="stylesheet" type="text/css" />
<link href="syntaxhighlighter/styles/shThemeDefault.css" rel="stylesheet" type="text/css" />
</head>
<body>
コードは下記です。
<pre class="brush:csharp">
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace ArrayDemo
{
public partial class FormMain : Form
{
public FormMain()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int[] array = new int[5];
array[0] = 10;
array[1] = 5;
array[2] = 8;
array[3] = 2;
array[4] = 4;
for (int i=0; i < array.Length; i++) {
textBox1.Text += "value["+i.ToString()+"] " + Convert.ToString(array[i])+"\r\n";
}
}
}
}
</pre>
コードは以上です。<br/>
<script type="text/javascript">
SyntaxHighlighter.all()
</script>
</body>
</html>
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCSharp.js"></script>
<link href="syntaxhighlighter/styles/shCore.css" rel="stylesheet" type="text/css" />
<link href="syntaxhighlighter/styles/shThemeDefault.css" rel="stylesheet" type="text/css" />
<pre class="brush:csharp">
using System;
using System.Collections;
(中略...)
}
</pre>
<script type="text/javascript">
SyntaxHighlighter.all()
</script>
</pre>