Hi Guest 1 HomePage 1 Jobs 1 WalkIn 1Articles  

 :) Latest Topic
AJAX
VB.NET
SQL Query
UDDI
CLASS
JAVASCRIPT
SharePoint Interview
SilverLight
WCF
general knowledge
 ASP.NET
 :) Hot Jobs
 
 :) Latest Articles


  

 
Syntax for Foreach loop to handle dataset with string and string builder
Question Posted on 13 Feb 2020

Home >> DotNet >> C# >> Syntax for Foreach loop to handle dataset with string and string builder



Syntax for Foreach loop to handle dataset with string and string builder
Below is the synta to handle foreach loop
(1)Use of string with foreach
string EmpName = string.Empty;
foreach(row in Dataset)
{
EmpName += row.Name;
}


(2)Use of StringBuilder with foreach
Stringbuilder sbval = new StringBuilder();
foreach(row in Dataset)
{
sbval.Append(row.Name);
}
string EmpName = sb.ToString();


Other Important Questions
C#.Net Reserve Words
Code to get sum of given digit up to level one
can we inherit private class level variables in c#
what is multicast delegate
Difference between struct and class







 
Top Searches:asp net questions vb net questions sql query uddl questions class javascript sharepoint interview questions and concept silverlight questions and concept wcf questions beans general knowledge ajax questions
PHP | Biztalk | Testing | SAP | HR |