2012年3月17日土曜日

開発環境

  • Microsoft Windows 7 Home Premium (OS)
  • Microsoft Visual C# 2010 Express Edition (IDE)
  • 言語: C#

独習C# 第3版 ハーバート・シルト (著) エディフィストラーニング株式会社 矢嶋聡 (監修, 翻訳)の第2章(C#のデータ型と演算子)の理解度チェック1, 2, 3, 4を解いてみる。

1.

C#で、単純型の範囲と振る舞いが厳密に定義されている理由は、エラーを防ぎ、信頼性を高めるため。

2.

C#の文字型はcharで、シングルクォートで囲む。

C#の文字型が他の多くのプログラミング言語のそれと異なる点は、他の言語では8ビット(ASCII)で表現されるのに対して、C#では16ビット(Unicode)で表現されること。

3.

正しくない。bool型はtrueかfalseで表される。

4.

改行(\n)を使えばいい。せっかくなので逐語的文字列リテラル(@)を使用した場合も。

コード

using System;

class Tester
{

    public void Run()
    {
        Console.WriteLine("One\nTwo\nThree");
        Console.WriteLine("逐語的文字列リテラルを使用");
        Console.WriteLine(@"One
Two
Three");
    }
    static void Main()
    {
        Tester t = new Tester();
        t.Run();
    }
}

入出力結果(Console Window)

One
Two
Three
逐語的文字列リテラルを使用
One
Two
Three
続行するには何かキーを押してください . . .

1 コメント :

Unknownさんのコメント...

With a very historical past guiding the idea, there isn't stun which the type carries right behind the nation's ranges a portion of the ideal looks after on the planet. There may an issue with regards to sporting this kind of esteemed observe of which california certainly not often be coordinated by means of almost every other model. On this to be explained, there's no astonish this designer watches sell thus perfectly. Not surprisingly replica tag heuer, investing in different view should get away from a new move in thousands and thousands, otherwise thousands cash through your money and likelihood is that, most people both usually do not eliminate this specific dollars to waste while on an accessories replica watches uk, and also you might be purely eliminating this posh cost. For lots of, working with a enjoy along these lines would certainly grown to be likewise sophisticated of your expenditure to help make virtually any meaning. On the other hand, to get some, finding the visible look at is vital just for not just the esteem it gives you, but probably the style it will help your specific raise. Using a good overall look in the industry planet is vital pertaining to reaching clients along with company companions in addition to pieces perform present the fact that snapshot http://www.attrinity.com, given that frankly, nobody is going to set any reduce using a business assembly for you to faithfully inspect any timepiece. Because of the, people who are wishing to purchase completely new observe don't actually have to pay out performance for the purpose of this specific a different watches. On the other hand, will be possible to have person to store lots of income by having a watch. While using wrist watches, you'll be able to lower the cost and also have a watch which will function just the same, seem just the same, nonetheless have a relatively small fraction belonging to the selling price. After all, you happen to be covering your company if selecting a real look at, and that of which for what reason the imitation is usually far less highly-priced.

コメントを投稿