TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Bineesh Viswanath
NA
1k
777.5k
will DataTable within function Reduce Program Performance?
Oct 29 2013 2:18 AM
Sir, I have a doubt in datatable use in C#.
We often use the function from a class like this:-
I here writing two methods. Please go through my two methods
Method:1
public void EmployeeNameComboFill()
{
try
{
DataTable dtb= new DataTable();
EmployeeSP SpEmployee = new EmployeeSP();
dtbl = SpEmployee .EmployeeNameComboFill();
cmbName.DataSource = dtbl;
cmbName.ValueMember = "employeeId";
cmbName.DisplayMember = "employeeName";
cmbName.SelectedIndex = -1;
}
catch (Exception ex)
{
throw;
}
}
Method:2
public void EmployeeNameComboFill()
{
try
{
EmployeeSP SpEmployee = new EmployeeSP();
cmbName.DataSource=SpEmployee .EmployeeNameComboFill();
cmbName.ValueMember = "employeeId";
cmbName.DisplayMember = "employeeName";
cmbName.SelectedIndex = -1;
}
catch (Exception ex)
{
throw;
}
}
In the above functions, which one is faster or standard?
Reply
Answers (
3
)
Is CellValueChanged or CellClick Event is better ?
How to use calendar control for creating appointments