As we know, purposes of generics introduced in .NET 2.0 are to avoid boxing and unboxing. Generics will be improve our application performance and make it safer. I will not dwell on generics functionality. It’s have more specific topic.
I will talk about .NET supports in generics. I’m already making simple code to make generics collection.
TList<Orders> list=DataRepository.OrdersProvider.GetAll();
OK, list is a generic collection from Orders domain object. In UI layer I need to bind this object. Fortunately, .NET 2.0 API support object as data source. In this case I use windows form as UI so I will be use BindingSource class.
private BindingSource ordersBindingSource;
ordersBindingSource.DataSource = list;
BindingSource support generics data source, but it’s self isn’t generics control. When I see the metadata, I found this.
public object DataSource { get; set; }
Why BindingSource doesn’t have generics data source property? For example like this
public List<T> DataSource { get; set; }
Hemm, when I bind my generics object to BindingSource it will be boxing it to object. Also when I need the current object, It will be unboxing again to my domain object.
Orders order =(Orders) ordersBindingSource.Current;
orderid = order.OrderID;
Might I have very little knowledge in .NET, so I don’t know how to avoid boxing and unboxing in this case. If you have any solution, it will be appreciated. CMIIW
Finally, I has been deliver Mr Risman invitation's for that ceremony. Unfortunately I was late, so I can't met Mr Risman. Oh yeah...I was very busy for this day, not only this day but whole of this week. I have job, I have some assigment from Mr Choirul, I'm also member of committe for this ceremony. I'am also a students....:P.
Do you still remember with my last post? Of course i found an university for continue my study. It's not very great, but also not very bad. I think it's a middle grade. I have considering about it's quality, cost, duration and my available time, and it's acceptable with my standard.
You can imagine, that I'm very busy.....
I know have I have loose time in my office time because I'm not assign yet to any project. May be, in next two or three weeks. I can do my other duty in this time, but i think it's bad idea. Because it will be break the IT ethics and IT rule. It can be categorizing to be a corruption. Many employees, not only in IT field, doing this bad habit.
To solve this problem, I must allocating time for other duty to after office time. And if have loose time in office I do some study to improve my skill. It's material must be related with my next project.
I know we are young proffesional, have less experience in IT industry. So we need some share from IT expert, how to become good IT proffessional. My case is only few cases will be force in next time in my career. So I feel very glad that Mr Risman, one of speakers in this event, approve my invitation. I hope, we will be get valuable knowledge from this event. Because I'm very conscious that to become IT proffesional doesn't only need skills and knowledge but also, which the most important is “conduct“.
I will be there....