Text 101

Hi there!, I have a doubt on states and their usage.


In this image , in the 14th line we were creating a variable of type STATE!! and on the 21st line we are accessing the method GetStateStory() which is a method of type string(I have attached the image below)


My question here , if the method! GetStateStory() is of type string why we use the statement state.GetStateStory(); to access the method.
Thank you.

Hi Abinandan,

Methods are not of a type themselves but they can return a value. Methods need to be called to do something.

Is this what you wanted to know?

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms