This is an example of why it is usually wise to use the AS operator
except in performance critical places. Using the parentheses notation is
an unsafe cast; type checking does not occur at the time of the cast.
This is especially dangerous because you run the risk of corrupting
memory by writin
2012/12/4 Marcos Douglas
> On Tue, Dec 4, 2012 at 4:53 PM, Sven Barth
> wrote:
> > On 04.12.2012 20:03, Marcos Douglas wrote:
> >>
> >> Hi,
> >>
> >> See the code below.
> >> My question is: Why the cast worked, considering the c variable is a
> >> TAClass instance, not a TBClass.
> >
> >
> > As
On Tue, Dec 4, 2012 at 4:53 PM, Sven Barth wrote:
> On 04.12.2012 20:03, Marcos Douglas wrote:
>>
>> Hi,
>>
>> See the code below.
>> My question is: Why the cast worked, considering the c variable is a
>> TAClass instance, not a TBClass.
>
>
> As long as you don't access fields of TBClass inside
On 04.12.2012 20:03, Marcos Douglas wrote:
Hi,
See the code below.
My question is: Why the cast worked, considering the c variable is a
TAClass instance, not a TBClass.
As long as you don't access fields of TBClass inside of GetInfoA you
won't run into problems, because FInfoA is accessed usi