Created
March 21, 2019 16:47
-
-
Save magohl/06f9675c260d936f55d923aadfe85d40 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
public class LifeAsWeKnowIt : IDisposable | |
{ | |
void Life() | |
{ | |
bool isAlive = true; | |
do | |
{ | |
try | |
{ | |
Work(); | |
Eat(); | |
//Fun(); | |
Sleep(); | |
} | |
catch (Exception) | |
{ | |
isAlive = false; | |
} | |
} | |
while (isAlive); | |
this.Dispose(); | |
} | |
private void Sleep() | |
{ | |
throw new NotImplementedException(); | |
} | |
private void Work() | |
{ | |
throw new NotImplementedException(); | |
} | |
private void Eat() | |
{ | |
throw new NotImplementedException(); | |
} | |
public void Dispose() | |
{ | |
throw new NotImplementedException(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment