Creating a Windows Form application and adding a root calculation results in an error.

System :: Math: a class declared as "abstract" does not allow for instantiation.

To calculate using the function Math.Sqrt

The form of the record is as follows: b = Math.Sqrt(a);

  • one
    Who is there for typo votes? Well, not a typo. The normal question. - Qwertiy
  • @Qwertiy, but it seems to me that the question is not normal. The HARDWARE resulted only in the written text of an error. But the question is not "what is an abstract class," and not "how to call the method of an abstract class," and not "why such a class does not provide for the creation of an instance." In the current formulation, this "code does not compile, help me fix" without any attempt at independent solution. - user227465
  • @GreenDragon, and what solution would you like to see? - Qwertiy
  • @Qwertiy, I would like not to see such questions at all. And an attempt to solve in this case is the comprehension of the text issued by the compiler. - user227465
  • @GreenDragon, it calls a static function, but instead of a call, it gets an error when creating an instance of an abstract class. I myself once googled a similar error. Because it was unexpected to write through another sign. - Qwertiy

1 answer 1

 b = Math.Sqrt(a); 
 b = Math::Sqrt(a); 
  • Thank! It all worked. - Kirill Kuznetsov
  • @KirillKuznetsov, answer by clicking on the check mark to the left of it. - Qwertiy
  • 2
    @Kromster, in the quote code from the question, and then the code, as it should have been written correctly. It seems obvious, not? - Qwertiy
  • one
    @Qwertiy seems wrong to give an answer without explanation. - Kromster
  • one
    @Kromster, although you are right, but what question is the answer. - user227465