What problem?
You are creating two different instances of the
adds
class:
adds c1 = new adds();
add val_add = new adds();
As a result, they will each have separate
c
fields, which will contain different values.
Since you only call the
add
method on one of them, only the
val_add
instance will have a non-zero value.
If you did this:
adds c1 = new adds();
add val_add = c1;
val_add.add(15, 15);
Response.Write(c1.c);
Then you would get the value you expect.