<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://monobook.org/w/index.php?action=history&amp;feed=atom&amp;title=%E3%82%B7%E3%83%BC%E3%82%B6%E3%83%BC%E6%9A%97%E5%8F%B7%2FC_Sharp</id>
	<title>シーザー暗号/C Sharp - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://monobook.org/w/index.php?action=history&amp;feed=atom&amp;title=%E3%82%B7%E3%83%BC%E3%82%B6%E3%83%BC%E6%9A%97%E5%8F%B7%2FC_Sharp"/>
	<link rel="alternate" type="text/html" href="https://monobook.org/w/index.php?title=%E3%82%B7%E3%83%BC%E3%82%B6%E3%83%BC%E6%9A%97%E5%8F%B7/C_Sharp&amp;action=history"/>
	<updated>2026-06-04T10:04:33Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://monobook.org/w/index.php?title=%E3%82%B7%E3%83%BC%E3%82%B6%E3%83%BC%E6%9A%97%E5%8F%B7/C_Sharp&amp;diff=2084&amp;oldid=prev</id>
		<title>219.108.113.216: ページの作成：「C#によるシーザー暗号の記述例。  == 記述例1 == The Zen of Pythonのソースコードを見ながら、The Zen of Pythonが...」</title>
		<link rel="alternate" type="text/html" href="https://monobook.org/w/index.php?title=%E3%82%B7%E3%83%BC%E3%82%B6%E3%83%BC%E6%9A%97%E5%8F%B7/C_Sharp&amp;diff=2084&amp;oldid=prev"/>
		<updated>2012-05-23T02:44:50Z</updated>

		<summary type="html">&lt;p&gt;ページの作成：「&lt;a href=&quot;/wiki/C_Sharp&quot; title=&quot;C Sharp&quot;&gt;C#&lt;/a&gt;による&lt;a href=&quot;/wiki/%E3%82%B7%E3%83%BC%E3%82%B6%E3%83%BC%E6%9A%97%E5%8F%B7&quot; title=&quot;シーザー暗号&quot;&gt;シーザー暗号&lt;/a&gt;の記述例。  == 記述例1 == &lt;a href=&quot;/wiki/The_Zen_of_Python&quot; title=&quot;The Zen of Python&quot;&gt;The Zen of Python&lt;/a&gt;の&lt;a href=&quot;/wiki/%E3%82%BD%E3%83%BC%E3%82%B9%E3%82%B3%E3%83%BC%E3%83%89&quot; title=&quot;ソースコード&quot;&gt;ソースコード&lt;/a&gt;を見ながら、&lt;a href=&quot;/wiki/The_Zen_of_Python&quot; title=&quot;The Zen of Python&quot;&gt;The Zen of Python&lt;/a&gt;が...」&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[C Sharp|C#]]による[[シーザー暗号]]の記述例。&lt;br /&gt;
&lt;br /&gt;
== 記述例1 ==&lt;br /&gt;
[[The Zen of Python]]の[[ソースコード]]を見ながら、[[The Zen of Python]]がデコードできるかで動作確認した。それ以外では試していない即席コードなので何かしらの[[バグ]]があるかもしれない。&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
public static class CaesarCipher&lt;br /&gt;
{&lt;br /&gt;
    public static string Decode(string enc, int rot = 13)&lt;br /&gt;
    {&lt;br /&gt;
        int idx;&lt;br /&gt;
        int pos;&lt;br /&gt;
        var lut1 = new char[26];&lt;br /&gt;
        var lut2 = new char[26];&lt;br /&gt;
        for (idx = 0; idx &amp;lt; 26; idx++)&lt;br /&gt;
        {&lt;br /&gt;
            pos = (idx + rot) % 26;&lt;br /&gt;
            lut1[idx] = (char)(&amp;#039;A&amp;#039; + pos);&lt;br /&gt;
            lut2[idx] = (char)(&amp;#039;a&amp;#039; + pos);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        int len = enc.Length;&lt;br /&gt;
        var dec = new char[len];&lt;br /&gt;
        char one;&lt;br /&gt;
        for (idx = 0; idx &amp;lt; len; idx++)&lt;br /&gt;
        {&lt;br /&gt;
            one = enc[idx];&lt;br /&gt;
            if (&amp;#039;A&amp;#039; &amp;lt;= one &amp;amp;&amp;amp; one &amp;lt;= &amp;#039;Z&amp;#039;)&lt;br /&gt;
            {&lt;br /&gt;
                dec[idx] = lut1[one - &amp;#039;A&amp;#039;];&lt;br /&gt;
            }&lt;br /&gt;
            else if (&amp;#039;a&amp;#039; &amp;lt;= one &amp;amp;&amp;amp; one &amp;lt;= &amp;#039;z&amp;#039;)&lt;br /&gt;
            {&lt;br /&gt;
                dec[idx] = lut2[one - &amp;#039;a&amp;#039;];&lt;br /&gt;
            }&lt;br /&gt;
            else&lt;br /&gt;
            {&lt;br /&gt;
                dec[idx] = one;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        return new string(dec);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 関連項目 ==&lt;br /&gt;
* [[C Sharp|C#]]&lt;br /&gt;
* [[シーザー暗号]]&lt;br /&gt;
&lt;br /&gt;
== 参考文献 ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 外部リンク ==&lt;br /&gt;
&lt;br /&gt;
{{stub}}&lt;/div&gt;</summary>
		<author><name>219.108.113.216</name></author>
	</entry>
</feed>