Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Thursday, May 22, 2014

JavaScript For Loops and its Cousins

What?! JavaScript doesn't have a for-each loop? You gotta be kidding me!

That was my reaction to my co-worker whose code I was peer-reviewing. I suggested him to use a for-each loop instead of a vanilla for. And he said - "I don't remember seeing a foreach loop in JavaScript?!"

JavaScript has some interesting variations to the for loops and I feel they are not really that popular. So in a bid to learn and understand them I wrote a post on CodeProject. I hope you find it helpful. 


Saturday, October 16, 2010

C#: Quick Reference – Access Modifiers

C# Access Modifiers
Declared AccessibilityDescription
publicAccess is not restricted.
protectedAccess is limited to the containing class or types derived from the containing class.
internalAccess is limited to the current assembly.
protected internalAccess is limited to the current assembly or types derived from the containing class.
privateAccess is limited to the containing type.
Declared Accessibility Rules
ParentParent Default
Accessibility
Allowed
Declared
Accessibility
of the
Parent
Member
Default Accessibility
Allowed
Declared
Accessibility
of the
Member
namespacepublicNoneinternalinternal
public
enumpublicNonepublicNone
classinternalAllprivateAll
interfaceinternalinternal
public
publicNone
structinternalinternal
public
privateinternal
public
private
constructorprotectedAll
fieldprivateAll
delegateinternalinternal
public