Jexs
✅ Does it take both types?
in this code:
’’’cs
while (true)
{
Console.Clear();
Console.WriteLine("===== Console Calculator =====");
Console.WriteLine("1. Addition (+)");
Console.WriteLine("2. Subtraction (-)");
Console.WriteLine("3. Multiplication (*)");
Console.WriteLine("4. Division (/)");
Console.WriteLine("5. Exit");
Console.Write("Select an option (1-5): ");
string choice = Console.ReadLine();
if (choice == "5")
{
Console.WriteLine("Exiting... Goodbye!");
break;
}
Console.Write("Enter first number: ");
if (!double.TryParse(Console.ReadLine(), out double num1))
{
Console.WriteLine("Invalid input! Press any key to try again.");
Console.ReadKey();
continue;
}
’’’
the method takes in both normal numbers and decimal numbers ?
12 replies
What is this
Can someone explain to me what this is and what it means and what it does ? I’m a newbie
public static System.Runtime.CompilerServices.CallSiteBinder BinaryOperation (Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, System.Linq.Expressions.ExpressionType operation, Type? context, System.Collections.Generic.IEnumerable<Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo>? argumentInfo);
226 replies
How do i start?
Im a noob when it comes to WPF and i was wondering if someone could point me in the right direction I want to create a Calculator program with a log in screen and a note taking section with a search bar to look for notes. What should i do?
5 replies
What should i choose?
Im a beginner and im trying to make simple calculator should i go with WPF Application or Windows Form App when will i ever need to use either one in a certain situation like when will my boss ask me to choose a certain one and why?
14 replies
Please help me to understand this:
Hi i was wondering if i could get some feed back on this code:
using System;
namespace Pratice
{
class Example
{
public void DoSomething()
{
Console.WriteLine("do something with this object");
}
}
class ExampleUser
{
public void UseExample(Example example)
{
Console.WriteLine("this is an example");
}
}
}
public void UseExample(Example example)
{
Console.WriteLine("this is an example");
}
what is it called when we pass another method into another one should i just say "this code is accepting the the class Example as a method reference" what? idk the termnoigly i was wondering if someone could explainthis to me
like whats going on in this example
5 replies
Am I reading this right?
in this code :
for (int i =0; i < 5: i++)
{
Console.WriteLine(i);
}
So am i understanding this right?: First you have to declare statement 1 witch is int i = 0; once this is declared the complier execute the code block that contains Console.WriteLine(i); statement 2 defines the condition for executing the code block. statement 3 is executed everytime after the code block has been executed?
56 replies