Unfortunately you have fallen into the common trap of comparing bad COBOL with good C#. If you had written good COBOL using Micro Focus products it would look like this:
method-id. “button1_Click” private.
procedure division using by value sender as object e as
set button1::“PropTest” to "Call COBOL"
end method “button1_Click”.
Which has almost exactly the same number of syntactic elements as the C# version.
You have also chosen an example of something C# is very good at. How about something extremely useful and at which C# is not very good? How about writing large precision calculation software? This is the sort of thing that stock exchanges, banks and many other ‘heavy lifting’ applications have to do all the time. If COBOL is so clunky, show me how C# would do this (I think you will find you need a third party class library and a page of code to do what COBOL does in a few lines):
program-id. Program1. 01 a pic 9(30)v99. 01 b pic 9(30)v99. 01 d pic 9(30).99. 01 i binary-long. procedure division. perform varying i from 0 by 1 until i equals 35 compute a = a * 9 + i / 91 compute b = b * 9 + i / 101 end-perform move a to d display "First number " d move b to d display "Second number " d add a to b giving d display "Sum of the two " d end program Program1.
Not only is this a simple and clean implmentation, it will compile and run native on almost any major platform as well as .net.
The point being that one reason COBOL has been around for so long because it does what it does very well. Not only that, but modern versions of COBOL do everything else well in addition.
The next generation of COBOL from Micro Focus will be able to do even more with even fewer syntactic elements required and even more features C# and other similar languages lack.
Best wishes - AJ