If a class is having 4 variables namely type double,type
integer,type string,type decimal.
If we create an instance of that class those variables which
gets into this instance are value types or reference types?
Answers were Sorted based on User's Feedback
Answer / anna
if it is a value type in base class , it will also be a
value type in the derived.
if it is reference type, then it is reference.
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / parmjit
It depends upon member's data type.
If it is of primitive type, structure or enum type, it will
be of value type
Otherwise it will be of reference type.
| Is This Answer Correct ? | 0 Yes | 1 No |
Why would you use a class property in c#?
What do you mean by hashtable c#?
What Is The Difference Between The System.array.copyto() And System.array.clone()?
Why var is used in c#?
Is visual c# free?
Why do we need indexers in c#?
How to assign default value to nullable types? Did nested nullable types are allowed
What is the use of base keyword? Tell me a practical example for base keyword’s usage?
Is string value type c#?
What are c# i/o classes?
Where is the keyword void used?
Where is the output of TextWriterTraceListener redirected?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)