Get Set Functions for variables in a class

In reply to venky.bollepally:

Yea, i will check the return type. But i don’t want to write many get set functions. I want to know if there is a way to write a “single function/task or anything similar to get and set values” for all the variables.