Click here to Skip to main content
14,022,607 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hallo everyone. plzzz do not rediect me to some other web source or somebody. its not a good way to answer.

AAnd my question is why recursive method used here. the class (
) below from zkempeerer.dll. it is to connect and control scanner device.whats benefit of doing its method recursive? I never used recursion.

class SomeClass{
 CZKEM objCZKEM = new CZKEM();

        #region 'What we will be using'

        public bool BatchUpdate(int dwMachineNumber)
            return objCZKEM.BatchUpdate(dwMachineNumber);

        public bool Beep(int DelayMS)
            return objCZKEM.Beep(DelayMS);


What I have tried:

I have searched google and other web sources. but they say about difference between loop and recursion and iteration ...
Updated 1-Feb-19 10:01am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

There is no recursion in that code, nor is there a loop.
There may be recursion or iteration within the CZKEM class, but we can't see it if there is.

You do understand that recursion is calling a method (directly or indirectly) from itself, don't you?
public int factorial(int x)
   if (x <= 1) return 1;
   return x * factorial (x - 1);
What you have in that code is not recursion, it is encapsulation[^] which is a very different thing altogether.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web02 | 2.8.190417.4 | Last Updated 1 Feb 2019
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100