ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  C Sharp
 
 


 

 
 Visual Basic interview questions  Visual Basic Interview Questions
 C Sharp interview questions  C Sharp Interview Questions
 ASP.NET interview questions  ASP.NET Interview Questions
 VB.NET interview questions  VB.NET Interview Questions
 COM+ interview questions  COM+ Interview Questions
 ADO.NET interview questions  ADO.NET Interview Questions
 IIS interview questions  IIS Interview Questions
 MTS interview questions  MTS Interview Questions
 Crystal Reports interview questions  Crystal Reports Interview Questions
 BizTalk interview questions  BizTalk Interview Questions
 Dot Net interview questions  Dot Net Interview Questions
 Exchange Server interview questions  Exchange Server Interview Questions
 SharePoint interview questions  SharePoint Interview Questions
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions
Question
Is string reference type / value type ?
 Question Submitted By :: Pranab Mukherjee
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Is string reference type / value type ?
Answer
# 1
It's a common misconception that string is a value type. 
That's because its immutability  makes it act sort of like 
a value type. It actually acts like a normal reference type
 
Is This Answer Correct ?    2 Yes 1 No
Narayansahu
[Netx Softwares Pvt. Ltd.]
 
  Re: Is string reference type / value type ?
Answer
# 2
//string is a refference type but it behavious like a value
//type.
//following programe show both charactersitic of string.
using System;
class a
{
    public static void Main(String [] args)
     {
          String str1="hello";
          String str2=str1;
          String str3="hello";
         Console.WriteLine(str1);
         Console.WriteLine(str2);
         if(str1==str3)
           {
               Console.WriteLine("str1 anb str3 are 
equal ");
            }
      }
}
 
Is This Answer Correct ?    1 Yes 1 No
Vinay Tiwari
 
 
 
  Re: Is string reference type / value type ?
Answer
# 3
string is both type it depends on use
 
Is This Answer Correct ?    0 Yes 3 No
Deepak Sharma
 
  Re: Is string reference type / value type ?
Answer
# 4
string is reference type but it behaves as value
type.Because every time u assign a value to string a new
object is created.
 
Is This Answer Correct ?    3 Yes 0 No
Ankur Sehgal
 
  Re: Is string reference type / value type ?
Answer
# 5
String is a reference type
 
Is This Answer Correct ?    8 Yes 0 No
Vijay
 
  Re: Is string reference type / value type ?
Answer
# 6
string is referrence type....
bcz there is no limitations of string means it can have variable length......thats why str[0],str[1],
string stores only the referrence to the value stored in it....
 
Is This Answer Correct ?    0 Yes 0 No
Avisek
 
  Re: Is string reference type / value type ?
Answer
# 7
String is reference type .
 
Is This Answer Correct ?    2 Yes 0 No
Vakil Vijay Vamangari
 

 
 
 
Other C Sharp Interview Questions
 
  Question Asked @ Answers
 
Difference between dispose and destructor? TCS2
what is unit testing  2
Can two catch blocks be executed?  12
Difference between ByVal and ByRef? Microsoft3
What are the ways to deploy an assembly?  1
What?s the difference between an interface and abstract class?  4
What are the ways to deploy an assembly? Visual-Soft2
why instance? what are the uses of instance? Choice-Solutions2
What does assert() do?  1
what is serilization? Protech5
Can we have private constructor in our class file. When we are trying to create instance for the class will it create or throw error regarding that?  3
what are the different ways to cleaning up objects? Wipro1
What is the difference between cookies and session? ADITI2
What is a private constructor? where will you use it? Fulcrum-Logic5
What?s an interface class?  1
How u call destructor and dispose methode in c#.NET  1
How to transpose rows into columns and columns into rows in a multi-dimensional array? Microsoft2
Explain the three services model (three-tier application).  3
can we drive a class from delegate? InterGraph4
What is ENUM? Wipro5
 
For more C Sharp Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com