Roman2017-08-16 16:14:51
Roman, 2017-08-16 16:14:51

Yes, what's the problem?

I can't already. Some advise to learn from mistakes, others - to read books, the third - to watch videos. Decided to start in chronological order. Now explain to me why it doesn't work?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Text
    class Program
        static void Main(string[] args)
            bool IsFilm = true;
            while (IsFilm)
                Console.WriteLine("Введите название фильма");
                string FilmName = Console.ReadLine();
                if (String.IsNullOrWhiteSpace(Isfilm))
                    Console.WriteLine("Вы должны ввести название!");
                    Console.WriteLine("Название фильма - " + FilmName + " вы согласны его оставить?True/False?");
                    string IsFilm1 = Console.ReadLine();
                        if (IsFilm1 = true)
                            IsFilm = False;
            Console.WriteLine("Фильм" + FilmName);

Answer the question

In order to leave comments, you need to log in

4 answer(s)
Stanislav Romanov, 2019-04-11

Try removing the tmp directory. If that doesn't work, remove node_modules and bower and reinstall everything. If that doesn't work, remove bower from the project and move all dependencies to package.json

Eugene Mosyukov, 2017-08-16

You are reading the string: string IsFilm1 = Console.ReadLine;, and comparing it with the boolean type , and besides, you are comparing it incorrectly, you need to write . In your case, you need to correct for - i.e. comparing string with string. if (IsFilm1 = true)==
IsFilm1 == "true"

Andrei Smirnov, 2017-08-16

Install ReSharper already and read/correct all its warnings.
Then start FxCop and do the same.
You can do it in any order.

Maxim Grekhov, 2017-08-25

I made a small example of how to better format the code and name variables:

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question