Example of recursive call in MSD axapta

Example of recursive call in axapta

 void recursiveCall(ProjId _projId = "")  
 {  
 ProjTable projTable;  
 ;  
 while select projTable  
 where projTable.parentId == _projId  
 {  
 setprefix(projTable.parentId);  
 info(projTable.projId);  
 this.recursiveCall(projTable.projId);  
 }  
 }