TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sanjay Sharma
1.3k
413
27.3k
Service object initialization approach/ Static
Mar 1 2018 5:25 AM
Hi,
I am using IBusinessService class. I use one helper method to create instance of this class.
creating instancce of this class is Expensive and takes time. I want to avoid create instance when IBusinessService already initaizalize.
class A
{
private readonly IBusinessService _service = API.BusinessService();
method1();
method2();
}
In above _service always created.
Using static suffices but observed break sometimes. application is api based so static is not recommanded I guess.
Reply
Answers (
3
)
PushSharp.Apple.NotificationFailureException error
Package Manager Console not found in Tools menu in vs 2010