Search | Statistics | User Listing Forums
XNA Resources
XNA Resources -> Tutorial Forums -> Sprite Engine Series -> View Thread

You are logged in as a guest. ( logon | register )

Tutorial Number 2
Jump to page : 1
Now viewing page 1 [25 messages per page]
View previous thread :: View next thread Tutorial Forums -> Sprite Engine SeriesMessage format
Posted 2012-03-19 12:26 AM (#428)
Subject: Tutorial Number 2


Posts: 11

There is a error in the bottom of the tutorial number 2

public object ICloneable.Clone()
return new FrameAnimation(this.rectInitialFrame.X, this.rectInitialFrame.Y,
this.rectInitialFrame.Width, this.rectInitialFrame.Height,
this.iFrameCount, this.fFrameLength, sNextAnimation);

You don't need or rather shouldn't put the protection modifier in front ICloneable.Clone() method.

The reason for an explicit interface implementation is to avoid name collisions with the end result being that the object must be explicitly cast to that interface before calling those methods.

You can think of these methods not as being public on the class, but being tied directly to the interface. There is no reason to specify public/private/protected since it will always be public as interfaces cannot have non-public members.
Top of the page Bottom of the page
Jump to page : 1
Now viewing page 1 [25 messages per page]
Jump to forum :
Search this forum
Printer friendly version
E-mail a link to this thread

(Delete all cookies set by this site)
Running MegaBBS ASP Forum Software
© 2002-2017 PD9 Software