Hi Guys,
I'm a beginner in C# Language and studying/learning it for past 1 month via Internet.. To make myself understand it clearly skipping theoretical part I'm trying to develop multiple simple things and working on them and finding issues and optimizing codes and learn also..
So I'm stuck on some issues for which I googled and didn't find appropriate answer also I need some expert advice to guide me.
My first issue/query is.
I have created a multiple methods which are in series to do a work
So is my above way of calling my method is correct.
My second issue is
In My above code i used some other method calling in a method to parse/find text value from my file in order to use in next method.. But if value is return null then i need it to go to previous method in order to complete code from 1st method correctly. But if i do something like this
void FetchData()
{ //code
if (data1 == null)
Replace();
}
Here it will go to to Replace method and once it is finished it will come out via Fetchdata method and work on next method... {I'm also getting confuse what will happen}
Please Help me as I'm thinking of this and making my self confuse more.
Please and Thanks..
I'm a beginner in C# Language and studying/learning it for past 1 month via Internet.. To make myself understand it clearly skipping theoretical part I'm trying to develop multiple simple things and working on them and finding issues and optimizing codes and learn also..
So I'm stuck on some issues for which I googled and didn't find appropriate answer also I need some expert advice to guide me.
My first issue/query is.
I have created a multiple methods which are in series to do a work
C#:
void button_click()
{
Sort();
await Task.delay // to let my GUI Unfreeze
Replace();
await Task.delay // to let my GUI Unfreeze
Show();
}
void Sort()
{ //code }
void Replace()
{ //code }
void Show ()
{ //code }
My second issue is
C#:
void button_click()
{
Sort();
await Task.delay // to let my GUI Unfreeze
Replace();
await Task.delay // to let my GUI Unfreeze
Show();
}
void Sort()
{
//code
Fetchdata();
}
void Replace()
{
//code
FetchData2();
}
void Show ()
{ //code }
void FetchData()
{ //code }
void FetchData2()
{ //code }
In My above code i used some other method calling in a method to parse/find text value from my file in order to use in next method.. But if value is return null then i need it to go to previous method in order to complete code from 1st method correctly. But if i do something like this
void FetchData()
{ //code
if (data1 == null)
Replace();
}
Here it will go to to Replace method and once it is finished it will come out via Fetchdata method and work on next method... {I'm also getting confuse what will happen}
Please Help me as I'm thinking of this and making my self confuse more.
Please and Thanks..
Last edited: