G
Guest
I am reading a CSV file which could be like this -
Name1 functionName
PK isNumeric
AB isAlpha
CD isDate
I read this CSV file and have all the records in a dataset.
When I come to column 2 which is the function name, I have to invoke the
method isNumeric or isalpha or isDate or any such method.
now, the methods would onlt take a single parameter and return a boolean.
Since I don't know the name of the function, I thot delegates is the best
way , kind of function pointers. I am not sure of the syntax
step 1 : declare delegate
Step 2 : create delegate variable
step 3 : ??? how to assign the address of a function to the delegate . The
function name is in a variable????
step 4: invoke the method.
Can someone fill up on step 3???
Is this the right way to do???
Thanks
PK
Name1 functionName
PK isNumeric
AB isAlpha
CD isDate
I read this CSV file and have all the records in a dataset.
When I come to column 2 which is the function name, I have to invoke the
method isNumeric or isalpha or isDate or any such method.
now, the methods would onlt take a single parameter and return a boolean.
Since I don't know the name of the function, I thot delegates is the best
way , kind of function pointers. I am not sure of the syntax
step 1 : declare delegate
Step 2 : create delegate variable
step 3 : ??? how to assign the address of a function to the delegate . The
function name is in a variable????
step 4: invoke the method.
Can someone fill up on step 3???
Is this the right way to do???
Thanks
PK