Question

I am working on c # but I need to verify if a void type meets...

I am working on c # but I need to verify if a void type meets a condition to follow instructions but I don't know how to do it, I was trying to do it with an if in the following way but it gives me error someone could help me, or tell me how I can check the condition :(

if ((lex.addtoken(analisis.Type.Words_Reserved_Planificador) == true)&&(lex.addtoken(analisis.Type.Symbol_Two_Points)==true)) { //Type is class Enum

instruccions

}

else

{

Console.WriteLIne("Error :(");

}

Homework Answers

Answer #1

It would be great if the entire program was given. With the source code it would be easier.

You can use ' if ((lex.addToken(analysis.Type.Words_Reserved_Planificador))&&(lex.addtoken(analysis.Type.Symbol_Two_Points))) ' in order to check if there is any returned value of the function by deleting true as the return type.

If the return type is anything other than void then the ' if ' block instructions will be executed. If the return type is void then the ' else ' block will be executed.

For example,

if ((lex.addToken(analisis.Type.Words_Reserved_Planificador))&&(lex.addtoken(analysis.Type.Symbol_Two_Points)))
{

instructions

}

else

{

Console.WriteLine("Error :(");

}

Hope this helps.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
I am working on c # but I need to verify if a void type meets...
I am working on c # but I need to verify if a void type meets a condition to follow instructions but I don't know how to do it, I was trying to do it with an if in the following way but it gives me error someone could help me :( if ((lex.addtoken(analisis.Type.Words_Reserved_Planificador) == true)&&(lex.addtoken(analisis.Type.Symbol_Two_Points)==true)) { instruccions }else{ Console.WriteLIne("Error :("); }
I am trying to figure out the correct formula in statistics that I need to use...
I am trying to figure out the correct formula in statistics that I need to use for this question. When you or anyone else attempts to tell me and my associates that 1223 persons account for our opinions and tastes here in America, I get mad as hell! How dare you! When you or anyone else tells me that 1223 people represent America; it is astounding and unfair and should be outlawed. The writer then goes on to claim that...
MATLAB question and do not change subject. if you dont know skip I need a working...
MATLAB question and do not change subject. if you dont know skip I need a working MATLAB code which will tell me the type of damping which is present in the system. there are 3 types of damping . use if else and give the result. take mass stiffness damping coefficient as input. Dont post wrong answer of i will badly dislike
my program won't go to "goodbye" once the user doesn't want to play again and i...
my program won't go to "goodbye" once the user doesn't want to play again and i dont know what im doing wrong ``` bool play = true; while (play) { HighLow.Play(); //play again? PlayAgain();       } //exit message Console.WriteLine("Maybe next time, have a great day :)"); } //end of class //Create a method asking if they'd like to play again private static bool PlayAgain() { Console.WriteLine("------------------"); Console.WriteLine("Would you like to play again? [Y/N]:");    //if repsonse is y then...
Hello! I am coding in c# and I am having trouble using boolean variables and if...
Hello! I am coding in c# and I am having trouble using boolean variables and if statements. The project I am working on is based on the users input, and the code should branch into two different options. However, I am struggling to understand how to take the users input to decide which path to take. Another problem I am having is with my if statements. After the user has inputed information and the code decides to take them down...
I am working on a JSON WPF program-C#... I have 2 objects that I am concatenating....
I am working on a JSON WPF program-C#... I have 2 objects that I am concatenating. All I need to know is how to format the first block of code to where the data types match. Here is what I have: I need to take this: A.) { “Name” : “Walder” , “Alias” : “Hodor” , “Alliance” : “House Stark” } and this: B.) { “Name” : “Margaery Tyrell” , “Alias” : [ “The Little Queen”, “The Little Rose”, “Maid...
Hello i am working on a project for my programming course and i am a little...
Hello i am working on a project for my programming course and i am a little lost. The assignment is as follows: Part A Do all of problem 3.13 (Employee Class), including the main, as written. Part B Now, suppose a new company policy says that instead of the monthly salary we will now store the yearly salary. We will need to make this change inside Employee and support the new usage, without breaking existing code (such as the old...
I am trying to solve the following C++ problem over structures. I am having trouble with...
I am trying to solve the following C++ problem over structures. I am having trouble with the very last structure and I made a comment next to where I am confused. I included the assignment instructions and my current code. I would appreciate if anyone can help me explain what I need to do for the last structure. Thank you. Assignment Instructions Create a program that will prompt me for each of the following items: 1. Date of Birth 2....
C Programming: I am working on the problem below and have got all of the code...
C Programming: I am working on the problem below and have got all of the code down, except for one part I can't figure out. The logic for the calculation where the the total at each shop is giving after each iteration of the loop. this is the formula I've got: ingredientPrice += ingredient1; It calculates the total for the first shop properly, but for the shops that follow it gives a cumulative total rather than the singular total for...
I need to sum a looped listbox in C#. I am adding a snip of my...
I need to sum a looped listbox in C#. I am adding a snip of my code. The user is to input the number of days that were worked. You get paid .01 for the first day and then that amount doubles per day worked. The code I am posting already does what it is supposed to do - it displays a list with the numbers of days worked with the amount of pay for that day listed beside it....
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT