سؤال

I have a vb.net project here using code behind. Basically I have a page.aspx.vb code file with literally thousands of lines of code. I wanted to take all the subs and functions out of it to make it more "manageable" - but I have no idea how I can call subs from separate code files.

Would anyone be able to point me in the right direction for this?

Thanks. DS

هل كانت مفيدة؟

المحلول

In your new project just add .dll files from old project as a reference and then you can use those subs (They have to be Public).

You can find more about references HERE

نصائح أخرى

In VB.Net you can use modules in order to make subs and functions accessible from all over your code

Modules in `VB.Net` are similar to `static classes` in `c#`
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top