3
A Constructor can not return anything and we can't write void keyword also.
For more detail please refer the below URL
http://www.agrini-tricks.in/Tutorial/constructor-in-csharp-with-example-type-of-constructor.aspx
3
Hey Anoop,
Technically Constructors doesn't return any value. Please go through the following link.
http://www.aspdotnet-suresh.com/2013/09/csharp-constructor-example-types-of-constructor-in-csharp.html
3
Constructor does (technically) return a value, which is the instance of the class in which it is defined. Because the type of the returned value is by definition always an instance of a class in which constructor is defined it is never explicitly mentioned as it is meaningless to say so.
So it does return a value and it always an instance of a class in which it defined. But because it is such a standard, it is never mentioned.
To give you a crud example, you say that "Prakash is my brother and his gender is male". How does that sound?
2
refer the link:
https://social.msdn.microsoft.com/Forums/vstudio/en-US/2ec6fb3f-dd67-48c5-9655-1c479323fafa/can-a-constructor-return-a-value?forum=csharpgeneral
2
No sir constructor sioes not return .but it assign the value to members
2
HI Anoop,
Constructor doen't have any return type and not even void.
To know more about contructor Please refer the below URL,
http://www.c-sharpcorner.com/UploadFile/0c1bb2/constructors-and-its-types-in-C-Sharp/