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
Tangara G
NA
298
94k
why not using new when creating an instance ?
Nov 13 2016 10:04 PM
Dear experts,
I have this question which is probably very easy for most of you but it beats me cos I am used to Java way of creating a new instance by doing like this :
Category c = new Category();
However, I come across the below code where I am not sure why it is written this way :
public class PurchaseOrderBL
{
UniEntities db = new UniEntities();
int purchaseOrderId;
Category category;
My question is why not Category category = new Category(); ?
Here's the Category class:
public class Category
{
private int categoryId{
get { return categoryId; }
set { categoryId = value; }
}
Reply
Answers (
3
)
How to create Plugin Architecture with ASP.NET MVC
Export GridView Data into PDF file