c# - How Do I Open/Run A Class From A Separate Class? -
i'm making simple dos os c# on xamarin studio. thing i've made several programs doing thing can't on xamarin, in visual studio.
as best can explain difficulties: have class named osbootup.cs
, want class run, starts different class in project. there way that? , if not, way can it?
my code: (osbootup.cs)
using system; using system.io; using system.threading; namespace operatingsystemcore { public static class osbootup { public static void main (string[] args) { bool isstarting; start: isstarting = true; console.write ("starting syteraos "); thread.sleep (1000); console.write (". "); thread.sleep (1000); console.write (". "); thread.sleep (1000); console.write (". "); thread.sleep (1000); console.clear (); console.write ("starting syteraos "); thread.sleep (1000); console.write (". "); thread.sleep (1000); console.write (". "); thread.sleep (1000); console.write (". "); thread.sleep (4500); console.clear (); console.writeline ("press key start syteraos ..."); console.readkey (); end: dosconsole dconsole = new dosconsole (); isstarting = false; } } }
and in case need see other file, (dosconsole.cs):
using system; namespace operatingsystemcore { public class dosconsole { public void start () { console.writeline ("give name."); console.writeline (""); console.write ("name: "); string name = console.readline (); console.clear (); console.write ("user->" + name); } public void update () { } public void commands () { } } }
you have dosconsole dconsole = new dosconsole ();
, missing dconsole.start();.
(this answered by: mbeckish)
Comments
Post a Comment