[Overview][Constants][Types][Classes][Procedures and functions][Variables] | Reference for unit 'Classes' (#fcl)

# TReader.FindMethod

Return the address of a published method.

## Declaration

`protected function TReader.FindMethod(`
`ARoot: TComponent;`
`const AMethodName: String`
`):Pointer; virtual;`

## Description

FindMethod will search for the method in ARoot. If it isn't found there, then it will call a OnFindMethod handler, if one is installed, passing it the method name AMethodName, the result pointer and a variable which says whether an exception should be raised if no method with name AMethodName is found.

If the method cannot be found and the OnFindMethod returns True, then an exception will be raised.

## See also

TReader.OnFindMethod |  | Handler to find or change a method address.
TFindMethodEvent |  | Occurs when the streaming process needs to locate a method