Answer the question
In order to leave comments, you need to log in
C# - Creating a method that returns a value of type int?
Let's say I have a method in whose parameters you can only write a string and this method calculates the number of characters ("-") in this string, but how to do it so that
//...там же этот метод скажем scanner
static void Main()
{
string ty = Console.ReadLine();
int razd = scanner(ty);
}
Answer the question
In order to leave comments, you need to log in
Are you talking about this??
int sanner(string str)
{
return str.Length;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question