Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


which datatype i have to use we i need dynamic size.for eg.
empname .in first row it have only five chars.but next row it
have 100 chars.

Answers were Sorted based on User's Feedback



which datatype i have to use we i need dynamic size.for eg. empname .in first row it have only five..

Answer / mahesh kotekar

When there is a requirement of storing different length of
characters in an array . We can use jagged arrays.
int[][] jagged = new int[3][];
jagged[0] = new int { 1,2,3 };
jagged[1] = new int { 1, 2, 3, 4, 5 };
jagged[3] = new int { 1, 2, 3, 4, 5, 6, 7, 8,9};

Is This Answer Correct ?    3 Yes 1 No

which datatype i have to use we i need dynamic size.for eg. empname .in first row it have only five..

Answer / radhika

i think we can use arraylist for dynamic size
for example
arraylist al= new arraylist();
al[0]="empname";
al[1]="empname is ............";

Is This Answer Correct ?    3 Yes 1 No

which datatype i have to use we i need dynamic size.for eg. empname .in first row it have only five..

Answer / kishore

we can use arraylist for dynamic size

Example:
Arraylist arlst=new Arraylist();
arlstl[0]="empname";
arlstl[1]="xyzz.........";

Is This Answer Correct ?    1 Yes 1 No

Post New Answer



More C Sharp Interview Questions

What is a collection class in c#?

0 Answers  


Is is possible to force garbage collector to run?

0 Answers  


Explain the difference between const and static read-only?

0 Answers  


Explain About Web.config

0 Answers   Keane India Ltd,


Illustrate namespaces in c#?

0 Answers  






In the page load event I assigned dropdownlist’s datasource property to a valid list. On the submit button click.. The same datasource property is coming as null. Why?

0 Answers  


Define an assembly in .net?

0 Answers  


What is stringbuilder c#?

0 Answers  


what is the lifespan of the items stored in viewstate ?

4 Answers  


What is asp net c#?

0 Answers  


How do you implement multiple inheritance in .NET?

5 Answers   Infosys, Microsoft,


Why do we use readonly in c#?

0 Answers  






Categories