ตอบหัวข้อนี้ ตั้งหัวข้อใหม่

syberus
On 22 กุมภาพันธ์ 2551, syberus posted...
เจอของสวยงาม เข้ามาดูด่วน!!

กลุ่ม: n/a เป็นสมาชิกตั้งแต่: 1 พฤศจิกายน 2547 1:21
ตั้งหัวข้อ: 53 ตอบ: 397, 0 rewards
143
total rewards

public static class AnonyExt{
    
public static int Factorial(this int i)
    {
        return (i <= 1) ? 1 : (i-1).Factorial() * i;
    }
}

class Program
{
    
static void Main(string[] args)
    {
        
int a = 5;
        
Console.WriteLine(a.Factorial());
        
Console.Read();
    }
}

เข้าท่าปะ

 

parasit




กลุ่ม: Member
คำตอบที่ 1 วันที่ตอบ: 28 กุมภาพันธ์ 2551, 0 rewards

nice !!

orara




กลุ่ม: Member
คำตอบที่ 2 วันที่ตอบ: 29 กุมภาพันธ์ 2551, 0 rewards

สวยงามจิงๆ
 
ThaiSharp.net is the official Thailand .Net User Group accredited by INETA.