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
Dinesh Santhalingam
NA
737
368.5k
How to declare the data table column in c#?
Feb 2 2017 12:22 AM
class details
{
userdetails
userdetails
=
new
userdetails();
public string last;
public DataTable
generalinfo
=
new
DataTable();
public void loaddata(string [] path)
{
//Column were declared..............
/*generalinfo.Columns.Add("Name");
generalinfo.Columns.Add("Totalbike");
generalinfo.Columns.Add("Inuse");
generalinfo.Columns.Add("Time");*/
lines
=
path
;
//do something.............
}
}
I have a data table .I wish to declare the column for my data table.But If i declared in loaddata its creating some error.Because Loaddata is Run every time.So the Error raised.
Error:Datacolumn were already belongs to a data table ...
How to declare it before the load data .Please solve my issue?Thanks in advance...
Reply
Answers (
9
)
is this code good? can be better?
Create a lookup attribute in CRM 2016