i have a common library which contains several public methods. some methods include session and application objects which will be available in web projects. but because of publicitiy of those methods, a windows forms application can call those methods too. it will produce run time error because of unavailability of session objects.
what would be the best way to prevent those methods usage in compile time from windows applications? i am seeking for an easy implementation, complex solutions will not be useful for me.