Skip to content
Tags

,

Struct

April 5, 2012

So I recently wanted to create an object without having to define it in a file …  Something like a mock that would respond to a couple methods.

I wanted it to say, “Hey I am an object. Don’t worry about what class I belong to, but I respond to a couple methods a certain way. The reason for my existence is to respond to those methods”

The way to do that is Struct .

Advertisements

From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: