▼ กำลังโหลดข้อมูล... ▼
แสดงความคิดเห็น
คุณสามารถแสดงความคิดเห็นกับกระทู้นี้ได้ด้วยการเข้าสู่ระบบ
กระทู้ที่คุณอาจสนใจ
อ่านกระทู้อื่นที่พูดคุยเกี่ยวกับ
C (ภาษาคอมพิวเตอร์)
คอมพิวเตอร์
วิศวกรรมคอมพิวเตอร์
C#
การพัฒนาซอฟต์แวร์
การที่เรามี Function ที่มี Parameters มากกว่า 1 ตัวนี้เราต้องเรียกใช้งานยังไงหรอครับ???
คือถ้าเรามีFunction ที่มี parameters มากกว่าหนึ่งตัวเช่น
namespaceCSharp_Shell
{
public static class Program
{
static void Exem(int a,int b)
{
}
}
}
เราจะเรียกใช้งาน Function นี้จากอีก Function หนึ่งได้ไงครับคือปกติถ้ามีหนึง Parameters ก็จะใช้แบบ
static void Main()
{
Exam();
}
ตอนงงจริงครับผู้รู้ช่วยบอกที่
โค้ดโค้ดตัวปัญหา(ใครแก้ได้แก้ให้ที)
using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
namespace Test
{
public class Try
{
public void Main()
{
int seconds=1;
int mim=1;
showM(mim,str2);
showM(seconds,str2);
Count(seconds);
}
static void showM(int str,int str2)
{
Console.WriteLine("counting:{0}:{1}",str2,str);
CockChack(str);
}
static void Count(int w)
{
System.Threading.Thread.Sleep(50);
w++;
showM(w);
CockChack(w);
}
static void CockChack(int a)
{
if(a==60)
{
Console.WriteLine("hello world");
}
else
{
Count(a);
}
}
}
}