Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / November 2009

Tip: Looking for answers? Try searching our database.

Same class file for Win and Web

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Peter Hemmingsen - 30 Nov 2009 14:20 GMT
Hi

I've a very simple class file with a number of static methods that I need to
call from both a Windows app and a Web app.

I dont want to build seperate dll's for these projects. The code should just
be a part each project. I've tried in studio to add the .cs file to each
project but instead of a reference to the same file the .cs file is copied
to each project directory.

Any help would be appreciated,- thanks.

Peter
Patrice - 30 Nov 2009 14:30 GMT
Hello,

> I dont want to build seperate dll's for these projects. The code should
> just be a part each project. I've tried in studio to add the .cs file to
> each project but instead of a reference to the same file the .cs file is
> copied to each project directory.

Have you used the "Add as Link" button in the dialog box ?
(http://msdn.microsoft.com/en-us/library/9f4t9t92(VS.80).aspx)

--
Patrice
Gregory A. Beamer - 30 Nov 2009 15:25 GMT
> I've a very simple class file with a number of static methods that I
> need to call from both a Windows app and a Web app.
[quoted text clipped - 5 lines]
>
> Any help would be appreciated,- thanks.

Encapsulate the functionality in a library. You can then call the
library from both types of projects.

NOTE: This is part of the problem I have been talking to numerous people
about for quite some time. When UI is viewed as part of the app, you end
up tightly coupling business logic and helper functions to the UI. The
application should be the business logic and helper functions only, and
the UI should sit on top of it.

Peace and Grace,

Signature

Gregory A. Beamer (MVP)

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************

|      Think outside the box!             |
*******************************************

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.