Tuesday 17 January 2012

Difference between imperative and interrogative code

Difference between imperative and interrogative code.

Imperative code does not return a value. It just does performs an action.

example:

c#
void demo()
{
Console.WriteLine("welcme");

}

vb.net
sub procedures are imperative code.
sub dd()

end sub

Interrogative code does return a value.

c#
ex: int add(int a)
{
return a*5;
}

VB.NET FUNCTIONS
ex
function calc(byval a as integer) as integer
return a*5
end function

No comments:

Post a Comment