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.

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of console application in c#?

462


How to update the gui from another thread in c#?

546


Can a method return multiple values in c#?

436


Can abstract class be sealed in c#?

458


What is written in c#?

522






How you will create satellite assemblies?

476


What is datarelation c#?

455


What is clr namespace?

480


Is a dll an assembly?

468


Explanation on Generic?

538


Do unused Namespaces in c# affect run-time performance?

512


Can I do things in il that I can't do in c#?

514


What are custom exceptions? Why do we need them?

512


What is static void main in c#?

489


What is the resgen.exe tool used for?

516