Method must have a return type c# -


  निजी शून्य खेलओवर () {int sw = 0; के लिए (int i = 0; i & lt; 4; i ++) के लिए (int j = 0; j & lt; 4; j ++) {if (m [i, j] == 0) sw = 1; Else textBox1.Text = "गेम ओवर"; }}   

मैं गेमऑवर () का उपयोग करने की कोशिश क्यों करता हूं? ?? यह एकमात्र त्रुटि है जो अप्रेसर है और मुझे पता नहीं क्यों है!

आप इसे दो बार कॉल कर सकते हैं:

  textBox1.Text = "खेल खत्म"; // पहले से ही फ़ंक्शन में   

जब आप इसका उपयोग करते हैं तो आप का उपयोग हो सकता है

  textBox1.Text = GameOver (); // मेरा अनुमान   

आपको बस का उपयोग करना चाहिए

  GameOver ();   

कृपया अपना कोड ठीक करें और हमें परिणाम लाओ।

Comments

Popular posts from this blog

c - Performance of System() -

python - how we can use ajax() in views.py in django? -

c++ - How to define methods in a base class that only work in derived classes? -