c# - Using yield WaitForSeconds -


I'm asking something which is very clear and I have ignored something, but I have a break before doing it Something I'm trying to make

I have seen that it is being used online in many places -

  yield waiters second (2);  

Although I get a syntax error,

"Error CS 1528: expected; or = (can not specify Constructor logic in declaration) (CS1528 ) (Assembly - CSHRP)

Which misleads me as is not really what exactly does yield actually mean or does it, And under the assumption that WaitForSeconds is a class on it in "2" constructor (an announcement Any help will be appreciated thanks!

What do you want, an INIMMTR

  IEnumerator Example () {print (time.time); Return new waiter seconds (5); print (time.time);}  

Then you will ask: How do I call it?

  zero start () {print ("start" + time.time); startcartine (wait and print (2.0f) ); Printed T ( "wait and" + time before printing finishes. Time);} INMATTATOR wait and print (float wait time) {yield R new wait waiting session (wait); Print ("Walk and Print" + Time Time); }  

I just posted John Skeet on the comments, I also recommend it, there is valuable information in it.


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -