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

sql - Return Function using Cursor -

c++ - why does this code produce a runtime error? -

javascript - Is there any way to add a new parameter to a function programmatically? -