среда, 7 ноября 2007 г.

Hellow World с использованием LINQ и Reflection

Забавы...

using System;

using System.Linq;

using System.Reflection;

 

namespace sillytests

{

    class Program

    {

        static void Main(string[] args)

        {

            foreach (var t in from fi in typeof(Reflect).GetFields() where !fi.IsStatic select fi.Name + " ")

                Console.Write(t.ToUpper());

 

        }

 

        class Reflect

        {

            public bool Hello;

            public int World;

            public string from;

            public double LINQ;

            public byte and;

            public float reflection;

            public static double BlaBlaber;

        }

    }

}

Комментариев нет: