2 Replies - 326 Views - Last Post: 09 October 2012 - 07:33 PM Rate Topic: -----

#1 BabySeal  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 15
  • Joined: 18-May 11

C# accessor and Loops

Posted 09 October 2012 - 05:40 PM

For example, I want to get the sum of a series, how would you go about doing this? I understand that get will "get" what I need from wherever it's being called from and set will "set" the value of what it's getting. But how would you go about putting a loop in this? I realize it's easier to do it in a method, but I also need to understand how this works as well.
Is This A Good Question/Topic? 0
  • +

Replies To: C# accessor and Loops

#2 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 3178
  • View blog
  • Posts: 9,635
  • Joined: 05-May 12

Re: C# accessor and Loops

Posted 09 October 2012 - 05:56 PM

Are you talking about indexers rather than accessors? http://msdn.microsof...o/6x16t2tx.aspx
Was This Post Helpful? 0
  • +
  • -

#3 tlhIn`toq  Icon User is online

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5316
  • View blog
  • Posts: 11,371
  • Joined: 02-June 10

Re: C# accessor and Loops

Posted 09 October 2012 - 07:33 PM

Quote

I want to get the sum of a series, how would you go about doing this?... But how would you go about putting a loop in this?


Go to your professor and be honest about how lost you are. Unlike history class where the chapter on 19th century industrialization has nothing to do with 14th plague, programming requires complete comprehension of chapter 2 before going to chapter 3. You cannot succeed if you just fake your way through this chapter hoping that it will all suddenly snap into place and become clear next chapter - IT WON'T. You'll just become more and more mired in confusion.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1