object/class question

  • Thread starter Thread starter Jim
  • Start date Start date
J

Jim

How do you get an object to return the same type as itself. I want to have
a calendar object that returns a date object as its default so you could do
something like this

myCalendar(date).FirstOfFollowingMonth.DayOfWeek

I want to do something like the string object where you can cascade methods
in the same line.


Sorry for the dumb question.


Jim
 
Jim said:
How do you get an object to return the same type as itself. I want to
have a calendar object that returns a date object as its default so you
could do something like this

myCalendar(date).FirstOfFollowingMonth.DayOfWeek

I want to do something like the string object where you can cascade
methods in the same line.

\\\
Public Class Foo
Private m_Foo As Foo

Public Property MyFoo() As Foo
Get
Return m_Foo
End Get
Set(ByVal Value As Foo)
m_Foo = Value
End Set
End Property
End Class
///
 
Thanks very much for your time to answer my question.. Mystery solved!


Jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top