+ 2

we can create a class using structures??

23rd Sep 2016, 6:26 PM
dileep vadlamudi
dileep vadlamudi - avatar
6 Answers
+ 2
Not quite. You can create something ressembling a class at best.
23rd Sep 2016, 7:48 PM
Zen
Zen - avatar
+ 1
There is a keyword called (struct) it creates something similar to a class. I'm not sure if this is what you're asking about though.
24th Sep 2016, 1:01 AM
Cheshire Cat
Cheshire Cat - avatar
+ 1
No. structure is different class is different.
24th Sep 2016, 6:24 AM
Bimal Tirkey
Bimal Tirkey - avatar
0
yes.. v can
23rd Mar 2017, 6:17 PM
Manibhushan Masabattina
Manibhushan Masabattina - avatar
0
class Person { var str = Man() } where Man is of type Structure struct Man { var a = 7 }
23rd Mar 2017, 6:21 PM
Manibhushan Masabattina
Manibhushan Masabattina - avatar
0
structures are sort of the base class of classes but no you cant use structs to make classes as structs cannot contain methods and are basically just boxes to hold variables in
26th Mar 2017, 7:41 PM
Logan New
Logan New - avatar