Hi all,
i am not all that new to .Net but i am still having the occasional plimp. Shared functions, i am confused to when i should declare a function as shared.
Now in take this instance for example. I have a real estate section wich is linked to resorts. Now when i add a new property, i also add a link to the resortID so i placed a drop down list within the page that i use to add the other property details.
to populate the drop down list i have a function in my resorts class which is getAllResorts(), now i know that i dont need all of the functionality of the resorts class, thus i shoudnt make an instance of it if i indeed i dont need it all, right?? so in this instance i have made getAllResorts() a shared function so i can call it without having to create an instance of the resorts class.
Is this right?? please tell me even if i have answered my own question.
Thanks,
Rob
i am not all that new to .Net but i am still having the occasional plimp. Shared functions, i am confused to when i should declare a function as shared.
Now in take this instance for example. I have a real estate section wich is linked to resorts. Now when i add a new property, i also add a link to the resortID so i placed a drop down list within the page that i use to add the other property details.
to populate the drop down list i have a function in my resorts class which is getAllResorts(), now i know that i dont need all of the functionality of the resorts class, thus i shoudnt make an instance of it if i indeed i dont need it all, right?? so in this instance i have made getAllResorts() a shared function so i can call it without having to create an instance of the resorts class.
Is this right?? please tell me even if i have answered my own question.
Thanks,
Rob