Click here to Skip to main content
15,893,622 members
Please Sign up or sign in to vote.
2.85/5 (3 votes)
I have to create a reusable user module in c#, asp.net which can be easily used in other applications. I have created a class library for user module that can be reusable .It contains Insert, update, delete and view users .I had written code for these operations in this class library. And I am using it in other application .It works fine. But what should I have to do if I need some extra entities for user in my new application other than my class library or dll . Please suggest me some solution to it.

Thanks.
Posted
Updated 13-Mar-14 0:14am
v3

1 solution

if you want to Just Extend it with some Additional Properties , then inherit from the Class and add the addtional properties in the Child Class. Also , should make set the Access Modifiers of the Base Class Members to Public.

Or You can use Extension Methods for the already existing Class Library Classes for extending it with Additional Functionalities.

Refer

Extension Methods in C# [^]

extension-methods-in-C-Sharp-3-0/[^]

http://msdn.microsoft.com/en-us//library/bb383977.aspx[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900