Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

what if i face those classes with no constructor in c#, if i want to initialize that class?

in csharp, i have face many such cases, no constructor, how to do

1 Answer

Relevance
  • Silent
    Lv 7
    10 years ago

    All non-static C# classes have constructors. If a constructor is not explicitly defined in the code, the compiler will generate a default constructor that takes no arguments and initializes all the member variables to their default values.

Still have questions? Get your answers by asking now.