When I add an item (an instance of a class) to a list, I need to know the index of the new item. Is it possible with any function?
Example code:
MapTiles.Add(new Class1(num, x * 32 + cameraX, y * 32 + cameraY));
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
MapTiles.Countwill give you the index of next item that will be added to the listSomething like: