In c#.Net Application For DataGridview binding which method is faster in below two case?Why..?
1)looping-Using For loop
2)Databinding direct using Dataset

Answers were Sorted based on User's Feedback



In c#.Net Application For DataGridview binding which method is faster in below two case?Why..? 1)lo..

Answer / nanak kumar behera

Databinding direct using Dataset

Is This Answer Correct ?    20 Yes 1 No

In c#.Net Application For DataGridview binding which method is faster in below two case?Why..? 1)lo..

Answer / velmahesh

Answer is , Databinding direct using Dataset..

Reason for if we store database values to dataset. then
values are binding shortly..

but, if use the for loop, that statement will execute
upto limit. so, it will take some seconds..

Is This Answer Correct ?    9 Yes 2 No

In c#.Net Application For DataGridview binding which method is faster in below two case?Why..? 1)lo..

Answer / shir

Using for loop is faster since the data will be populated as
soon as it is read using the data reader which is one way
read only process.

But when data set is used,
1. It internally makes use of the data reader in order to
populate the data set.
2. It takes huge amount of data enire amount of which might
not be required.
3. Later we will have to iterate throught DS to fill the
data grid

Is This Answer Correct ?    1 Yes 1 No

In c#.Net Application For DataGridview binding which method is faster in below two case?Why..? 1)lo..

Answer / hardit

if we are using " reader " in data retrieving ,it will be faster as it will only read values required.

but in the case of dataset which is a very heavy object it will take more time corresponding to reader in for loop.

Is This Answer Correct ?    0 Yes 4 No

Post New Answer

More C Sharp Interview Questions

What is selector c#?

0 Answers  


What are the basics of c#?

0 Answers  


Is for loop faster than foreach?

0 Answers  


i want display a given number into Rupees Format Like Given number is : 156735 my Expected output is 1,56,735. how to display?

6 Answers  


write a c# program add two matrix with input number ?

0 Answers   Wipro,






Why do we use dictionary in c#?

0 Answers  


How did you implemented classes in your project?

1 Answers   TCS,


Why we use get set property in c#?

0 Answers  


Why delegates are type safe in c#?

0 Answers  


Explain the difference between a sub and a function?

1 Answers   Wipro,


Why is hashset faster?

0 Answers  


What is the use of the dispose method in C# ?

0 Answers   Infosys,


Categories