❔ ✅ How to call a specific attribute from a getter class to another class
Hey there, I am struggling to call this attribute from another class. The two relevant code pieces are:
and
12 Replies
the issue is that I cant get the specific attribute I need into this textbox
What attribute?
sorry
the EarnedPoints attribute
what I want to do is this: `
but it throws the error
and I am not sure how to grab just that attribute from the list
So, those are called properties, not attributes
Attributes are very specifically different things in C#
ok sorry
I am just unsure of how to display that property
You have an entire list of
CompletedAssignment
s
You kinda need to choose just one to get its EarnedPoints
How you choose which one to take... that'll have to be up to youso like
hmmm
look I am feeding it a studentID and assignmentID right
and its supposed to output the EarnedPoints value
how do I choose in the list though?
I don't know
It's your list
By the way you call
GetCompletedAssignments
wrong
You have student ID and assignment ID backwards in your callthanks for the help! :) jk!
!close
Closed!
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.