Rajesh Singh
These static constructors are correct ? class A { statc intA() { } static A(int x,int y) { } static A(int x) { } }
By Rajesh Singh in C# on Nov 16 2015
  • sushil kumar
    Jul, 2017 20

    static constructor does not contain any parameter or access modifier or return type.

    • 1
  • Mukesh  kumar
    May, 2016 8

    Constructor don't have return type

    • 1
  • Raghvandra Shukla
    Mar, 2016 27

    Please see below class A { statc intA() { Correct } static A(int x,int y) { Incorrect } static A(int x) {Incorrect } }Static constructor automatically invoked/called by CLR so access modifer or parameters are not allowed

    • 1
  • sushil kumar
    Feb, 2019 20

    Static constructor must be parameterless.

    • 0
  • parvathi somanahalli
    Mar, 2017 18

    1. Incorrect because static constructor will not have return type 2&3. Incorrect because static constructor must be parameterless

    • 0
  • ashish bhui
    Oct, 2016 6

    Your class is not static how should you define constructor its compile time error.

    • 0
  • ashish bhui
    Oct, 2016 6

    Your class is not static it gives you compile time error..

    • 0
  • ashish bhui
    Oct, 2016 6

    Your class is not static it gives you compile time error..

    • 0
  • ashish bhui
    Oct, 2016 6

    Your class is not static it gives you compile time error..

    • 0
  • ashish bhui
    Oct, 2016 6

    Your class is not static it gives you compile time error..

    • 0
  • Mangesh Kulkarni
    Jul, 2016 31

    Static constructors should be parameter less

    • 0
  • Mangesh Kulkarni
    Jul, 2016 31

    Static Constructor must be parameter less

    • 0
  • vipin kv
    Mar, 2016 10

    Static constructor will automatically be invoked only once. It happens either creation of the first object or accessing its static members. Any way we cannot explicitly invoke the static constructor so access modifer or parameters are not allowed

    • 0
  • Anil Jha
    Mar, 2016 3

    no

    • 0
  • Rajesh Singh
    Nov, 2015 16

    A static constructor does not take access modifiers or have parameters.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS