CS0246 The type or namespace name 'MyProgram' could not be found (are you missing a using directive or an...












-6















The code I've written has no compiler errors but each time i try to run the program i am given the above error message. When I click on the compiler error it takes me to the 'MainPage' code. I have not touched anything on this page and I cannot understand why the code I have written with no compiler errors forces this to flag up as an error.



my code:



    using SnapsLibrary;

class Order
{
public void StartProgram()
{
SnapsEngine.SetTitleString("Select Type of Product");

int TrophyCount = 0;
int MedalCount = 0;

while (true)
{
string ProductChoice = SnapsEngine.SelectFrom3Buttons(
"Trophy",
"Medal",
"Order Total");

if (ProductChoice == "Trophy")
SnapsEngine.ClearTextDisplay();
SnapsEngine.AddLineToTextDisplay("Trophy Type");
string TrophyChoiceType = SnapsEngine.SelectFrom3Buttons(
"Football",
"Rugby",
"Hockey");
TrophyCount = TrophyCount + 1;

if (ProductChoice == "Medal")
SnapsEngine.ClearTextDisplay();
SnapsEngine.AddLineToTextDisplay("Medal Type");
string MedalChoiceType = SnapsEngine.SelectFrom3Buttons(
"1st",
"2nd",
"3rd");
MedalCount = MedalCount + 1;

if (ProductChoice == "Order Total")

{
SnapsEngine.ClearTextDisplay();

SnapsEngine.AddLineToTextDisplay("Order Totals");
SnapsEngine.AddLineToTextDisplay(TrophyCount.ToString() + "Trophy");
if (TrophyCount > 1)
{
SnapsEngine.AddLineToTextDisplay(TrophyCount.ToString() + "Trophies");
}
SnapsEngine.AddLineToTextDisplay(TrophyChoiceType.ToString() + "");
SnapsEngine.AddLineToTextDisplay(MedalCount.ToString() + " Medal(s)");
SnapsEngine.AddLineToTextDisplay(MedalChoiceType.ToString() + "");

string reply = SnapsEngine.SelectFrom2Buttons(item1: "Done", item2: "Reset");

if (reply == "Reset")
{
TrophyCount = 0;
MedalCount = 0;
}

SnapsEngine.ClearTextDisplay();
}
}
}
}


code that it is directing me to:



    SnapsManager.ActiveSnapsManager.StartProgram(typeof(MyProgram), "StartProgram");


It is a very basic program, but one which i intend on expanding and making better.










share|improve this question















closed as off-topic by Patrick Hofman, Mitch Wheat, Progman, tanascius, BJ Myers Nov 16 '18 at 0:03


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example." – Patrick Hofman, Mitch Wheat, Progman, tanascius, BJ Myers

If this question can be reworded to fit the rules in the help center, please edit the question.












  • 4





    The code I've written has no compiler errors Yes, it does.

    – Patrick Hofman
    Nov 15 '18 at 14:06






  • 2





    Show as the code

    – SehaxX
    Nov 15 '18 at 14:07






  • 2





    Can you see the word 'MyProgram' in the code that it's taking you to? Is your class or namespace called MyProgram or something else? Can you fix this by changing the identifier to the right one?

    – Rup
    Nov 15 '18 at 14:08











  • You should provide some code so we can help you better.

    – Niklas7
    Nov 15 '18 at 14:10






  • 1





    What's SnapsManager? Best guess you just need to change it to typeof(Order) since that's your class that has a StartProgram method.

    – Rup
    Nov 15 '18 at 14:39
















-6















The code I've written has no compiler errors but each time i try to run the program i am given the above error message. When I click on the compiler error it takes me to the 'MainPage' code. I have not touched anything on this page and I cannot understand why the code I have written with no compiler errors forces this to flag up as an error.



my code:



    using SnapsLibrary;

class Order
{
public void StartProgram()
{
SnapsEngine.SetTitleString("Select Type of Product");

int TrophyCount = 0;
int MedalCount = 0;

while (true)
{
string ProductChoice = SnapsEngine.SelectFrom3Buttons(
"Trophy",
"Medal",
"Order Total");

if (ProductChoice == "Trophy")
SnapsEngine.ClearTextDisplay();
SnapsEngine.AddLineToTextDisplay("Trophy Type");
string TrophyChoiceType = SnapsEngine.SelectFrom3Buttons(
"Football",
"Rugby",
"Hockey");
TrophyCount = TrophyCount + 1;

if (ProductChoice == "Medal")
SnapsEngine.ClearTextDisplay();
SnapsEngine.AddLineToTextDisplay("Medal Type");
string MedalChoiceType = SnapsEngine.SelectFrom3Buttons(
"1st",
"2nd",
"3rd");
MedalCount = MedalCount + 1;

if (ProductChoice == "Order Total")

{
SnapsEngine.ClearTextDisplay();

SnapsEngine.AddLineToTextDisplay("Order Totals");
SnapsEngine.AddLineToTextDisplay(TrophyCount.ToString() + "Trophy");
if (TrophyCount > 1)
{
SnapsEngine.AddLineToTextDisplay(TrophyCount.ToString() + "Trophies");
}
SnapsEngine.AddLineToTextDisplay(TrophyChoiceType.ToString() + "");
SnapsEngine.AddLineToTextDisplay(MedalCount.ToString() + " Medal(s)");
SnapsEngine.AddLineToTextDisplay(MedalChoiceType.ToString() + "");

string reply = SnapsEngine.SelectFrom2Buttons(item1: "Done", item2: "Reset");

if (reply == "Reset")
{
TrophyCount = 0;
MedalCount = 0;
}

SnapsEngine.ClearTextDisplay();
}
}
}
}


code that it is directing me to:



    SnapsManager.ActiveSnapsManager.StartProgram(typeof(MyProgram), "StartProgram");


It is a very basic program, but one which i intend on expanding and making better.










share|improve this question















closed as off-topic by Patrick Hofman, Mitch Wheat, Progman, tanascius, BJ Myers Nov 16 '18 at 0:03


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example." – Patrick Hofman, Mitch Wheat, Progman, tanascius, BJ Myers

If this question can be reworded to fit the rules in the help center, please edit the question.












  • 4





    The code I've written has no compiler errors Yes, it does.

    – Patrick Hofman
    Nov 15 '18 at 14:06






  • 2





    Show as the code

    – SehaxX
    Nov 15 '18 at 14:07






  • 2





    Can you see the word 'MyProgram' in the code that it's taking you to? Is your class or namespace called MyProgram or something else? Can you fix this by changing the identifier to the right one?

    – Rup
    Nov 15 '18 at 14:08











  • You should provide some code so we can help you better.

    – Niklas7
    Nov 15 '18 at 14:10






  • 1





    What's SnapsManager? Best guess you just need to change it to typeof(Order) since that's your class that has a StartProgram method.

    – Rup
    Nov 15 '18 at 14:39














-6












-6








-6


1






The code I've written has no compiler errors but each time i try to run the program i am given the above error message. When I click on the compiler error it takes me to the 'MainPage' code. I have not touched anything on this page and I cannot understand why the code I have written with no compiler errors forces this to flag up as an error.



my code:



    using SnapsLibrary;

class Order
{
public void StartProgram()
{
SnapsEngine.SetTitleString("Select Type of Product");

int TrophyCount = 0;
int MedalCount = 0;

while (true)
{
string ProductChoice = SnapsEngine.SelectFrom3Buttons(
"Trophy",
"Medal",
"Order Total");

if (ProductChoice == "Trophy")
SnapsEngine.ClearTextDisplay();
SnapsEngine.AddLineToTextDisplay("Trophy Type");
string TrophyChoiceType = SnapsEngine.SelectFrom3Buttons(
"Football",
"Rugby",
"Hockey");
TrophyCount = TrophyCount + 1;

if (ProductChoice == "Medal")
SnapsEngine.ClearTextDisplay();
SnapsEngine.AddLineToTextDisplay("Medal Type");
string MedalChoiceType = SnapsEngine.SelectFrom3Buttons(
"1st",
"2nd",
"3rd");
MedalCount = MedalCount + 1;

if (ProductChoice == "Order Total")

{
SnapsEngine.ClearTextDisplay();

SnapsEngine.AddLineToTextDisplay("Order Totals");
SnapsEngine.AddLineToTextDisplay(TrophyCount.ToString() + "Trophy");
if (TrophyCount > 1)
{
SnapsEngine.AddLineToTextDisplay(TrophyCount.ToString() + "Trophies");
}
SnapsEngine.AddLineToTextDisplay(TrophyChoiceType.ToString() + "");
SnapsEngine.AddLineToTextDisplay(MedalCount.ToString() + " Medal(s)");
SnapsEngine.AddLineToTextDisplay(MedalChoiceType.ToString() + "");

string reply = SnapsEngine.SelectFrom2Buttons(item1: "Done", item2: "Reset");

if (reply == "Reset")
{
TrophyCount = 0;
MedalCount = 0;
}

SnapsEngine.ClearTextDisplay();
}
}
}
}


code that it is directing me to:



    SnapsManager.ActiveSnapsManager.StartProgram(typeof(MyProgram), "StartProgram");


It is a very basic program, but one which i intend on expanding and making better.










share|improve this question
















The code I've written has no compiler errors but each time i try to run the program i am given the above error message. When I click on the compiler error it takes me to the 'MainPage' code. I have not touched anything on this page and I cannot understand why the code I have written with no compiler errors forces this to flag up as an error.



my code:



    using SnapsLibrary;

class Order
{
public void StartProgram()
{
SnapsEngine.SetTitleString("Select Type of Product");

int TrophyCount = 0;
int MedalCount = 0;

while (true)
{
string ProductChoice = SnapsEngine.SelectFrom3Buttons(
"Trophy",
"Medal",
"Order Total");

if (ProductChoice == "Trophy")
SnapsEngine.ClearTextDisplay();
SnapsEngine.AddLineToTextDisplay("Trophy Type");
string TrophyChoiceType = SnapsEngine.SelectFrom3Buttons(
"Football",
"Rugby",
"Hockey");
TrophyCount = TrophyCount + 1;

if (ProductChoice == "Medal")
SnapsEngine.ClearTextDisplay();
SnapsEngine.AddLineToTextDisplay("Medal Type");
string MedalChoiceType = SnapsEngine.SelectFrom3Buttons(
"1st",
"2nd",
"3rd");
MedalCount = MedalCount + 1;

if (ProductChoice == "Order Total")

{
SnapsEngine.ClearTextDisplay();

SnapsEngine.AddLineToTextDisplay("Order Totals");
SnapsEngine.AddLineToTextDisplay(TrophyCount.ToString() + "Trophy");
if (TrophyCount > 1)
{
SnapsEngine.AddLineToTextDisplay(TrophyCount.ToString() + "Trophies");
}
SnapsEngine.AddLineToTextDisplay(TrophyChoiceType.ToString() + "");
SnapsEngine.AddLineToTextDisplay(MedalCount.ToString() + " Medal(s)");
SnapsEngine.AddLineToTextDisplay(MedalChoiceType.ToString() + "");

string reply = SnapsEngine.SelectFrom2Buttons(item1: "Done", item2: "Reset");

if (reply == "Reset")
{
TrophyCount = 0;
MedalCount = 0;
}

SnapsEngine.ClearTextDisplay();
}
}
}
}


code that it is directing me to:



    SnapsManager.ActiveSnapsManager.StartProgram(typeof(MyProgram), "StartProgram");


It is a very basic program, but one which i intend on expanding and making better.







c#






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 15 '18 at 14:22







Luke R

















asked Nov 15 '18 at 14:05









Luke RLuke R

93




93




closed as off-topic by Patrick Hofman, Mitch Wheat, Progman, tanascius, BJ Myers Nov 16 '18 at 0:03


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example." – Patrick Hofman, Mitch Wheat, Progman, tanascius, BJ Myers

If this question can be reworded to fit the rules in the help center, please edit the question.







closed as off-topic by Patrick Hofman, Mitch Wheat, Progman, tanascius, BJ Myers Nov 16 '18 at 0:03


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example." – Patrick Hofman, Mitch Wheat, Progman, tanascius, BJ Myers

If this question can be reworded to fit the rules in the help center, please edit the question.








  • 4





    The code I've written has no compiler errors Yes, it does.

    – Patrick Hofman
    Nov 15 '18 at 14:06






  • 2





    Show as the code

    – SehaxX
    Nov 15 '18 at 14:07






  • 2





    Can you see the word 'MyProgram' in the code that it's taking you to? Is your class or namespace called MyProgram or something else? Can you fix this by changing the identifier to the right one?

    – Rup
    Nov 15 '18 at 14:08











  • You should provide some code so we can help you better.

    – Niklas7
    Nov 15 '18 at 14:10






  • 1





    What's SnapsManager? Best guess you just need to change it to typeof(Order) since that's your class that has a StartProgram method.

    – Rup
    Nov 15 '18 at 14:39














  • 4





    The code I've written has no compiler errors Yes, it does.

    – Patrick Hofman
    Nov 15 '18 at 14:06






  • 2





    Show as the code

    – SehaxX
    Nov 15 '18 at 14:07






  • 2





    Can you see the word 'MyProgram' in the code that it's taking you to? Is your class or namespace called MyProgram or something else? Can you fix this by changing the identifier to the right one?

    – Rup
    Nov 15 '18 at 14:08











  • You should provide some code so we can help you better.

    – Niklas7
    Nov 15 '18 at 14:10






  • 1





    What's SnapsManager? Best guess you just need to change it to typeof(Order) since that's your class that has a StartProgram method.

    – Rup
    Nov 15 '18 at 14:39








4




4





The code I've written has no compiler errors Yes, it does.

– Patrick Hofman
Nov 15 '18 at 14:06





The code I've written has no compiler errors Yes, it does.

– Patrick Hofman
Nov 15 '18 at 14:06




2




2





Show as the code

– SehaxX
Nov 15 '18 at 14:07





Show as the code

– SehaxX
Nov 15 '18 at 14:07




2




2





Can you see the word 'MyProgram' in the code that it's taking you to? Is your class or namespace called MyProgram or something else? Can you fix this by changing the identifier to the right one?

– Rup
Nov 15 '18 at 14:08





Can you see the word 'MyProgram' in the code that it's taking you to? Is your class or namespace called MyProgram or something else? Can you fix this by changing the identifier to the right one?

– Rup
Nov 15 '18 at 14:08













You should provide some code so we can help you better.

– Niklas7
Nov 15 '18 at 14:10





You should provide some code so we can help you better.

– Niklas7
Nov 15 '18 at 14:10




1




1





What's SnapsManager? Best guess you just need to change it to typeof(Order) since that's your class that has a StartProgram method.

– Rup
Nov 15 '18 at 14:39





What's SnapsManager? Best guess you just need to change it to typeof(Order) since that's your class that has a StartProgram method.

– Rup
Nov 15 '18 at 14:39












1 Answer
1






active

oldest

votes


















1














Thanks to Rup i have solved it.



The SnapsManager is there for the whole learning system and not just my crappy little attempt at a program,



I have changed my Class from Order to MyProgram and it is now running, its not working as i intended so back to the drawing board.






share|improve this answer






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Thanks to Rup i have solved it.



    The SnapsManager is there for the whole learning system and not just my crappy little attempt at a program,



    I have changed my Class from Order to MyProgram and it is now running, its not working as i intended so back to the drawing board.






    share|improve this answer




























      1














      Thanks to Rup i have solved it.



      The SnapsManager is there for the whole learning system and not just my crappy little attempt at a program,



      I have changed my Class from Order to MyProgram and it is now running, its not working as i intended so back to the drawing board.






      share|improve this answer


























        1












        1








        1







        Thanks to Rup i have solved it.



        The SnapsManager is there for the whole learning system and not just my crappy little attempt at a program,



        I have changed my Class from Order to MyProgram and it is now running, its not working as i intended so back to the drawing board.






        share|improve this answer













        Thanks to Rup i have solved it.



        The SnapsManager is there for the whole learning system and not just my crappy little attempt at a program,



        I have changed my Class from Order to MyProgram and it is now running, its not working as i intended so back to the drawing board.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 15 '18 at 14:46









        Luke RLuke R

        93




        93

















            Popular posts from this blog

            Xamarin.iOS Cant Deploy on Iphone

            Glorious Revolution

            Dulmage-Mendelsohn matrix decomposition in Python