DCSIMG
keywords - IronShay

Browse by Tags

All Tags » keywords (RSS)

Give way to the yield keyword!

I ran into this keyword by accident (yield, accident... very funny), and I must say - this accident was a good one! yield is a small keyword who has gotten used to live by the shadows of the celebrity keywords (static, const, Paris Hilton, Madonna, etc.), and I say – let's change it! Let's give yield what it deserves! Why am I so thrilled about it? OK, so let's introduce yield first – yield comes to help us to create an enumerator out of a single method. For example, this code: public...
Posted by shayf | 21 comment(s)

The static Keyword

We all use the static keyword, but do we really know what the possibilities are? Prologue The static keyword is, in general, an instance-less "thing". By "thing", I mean that it can be a variable, a class, a property and more... This definition has different meanings according to which "thing" it's related to. Let's look into it... Static Variables A static variable is the most common use of the static keyword I guess (I don't think there has been a real...
Posted by shayf | 4 comment(s)