Message 1 of 11
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I have seen in many programs programmers checking out if an object is not equal to null then proceed to next line .
Is it possible for example in the below codes the object be equal to null ? if not , why programmers using this check out then ?
thanks in advance.
if (per.Status == PromptStatus.OK)
{
using (Transaction MyTrans = db.TransactionManager.StartTransaction())
{
try
{
BlockReference Myblk = (BlockReference)MyTrans.GetObject(per.ObjectId, OpenMode.ForRead);
if (Myblk != null)
{
Solved! Go to Solution.