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
Tangara G
NA
298
93.6k
How do I call another class with its fields ?
Aug 6 2020 4:22 AM
I have a class named Target with fields like name, dob with the gettter and setter and a public class with constructors.
Now, I need another class to call Target fields.
So I put something like this :
public bool upload(Assessment assessment, Database database, Target target){
database = new ClauseService(settings);
assessment = database.GetTargetAssessment(target); // I awnt to know if this is valid because actually what I want is to bring in the field of Target like target.name, or target.getName() etc here in the parameters but I am not sure how to do it.
Furthermore, I'd like to know if Target class should exist at all but the fields in Target class is actually used in several classes.
I hope someone can advise me. Thanks.
Tks.
Reply
Answers (
3
)
how to secure web api developed with ado.net?
Add dropdown only Admin when add user otherwise not visible asp.net