why RectangleF.op_Implicit ?

Posted on 2007-07-25
Last Modified: 2013-12-17
RectangleF.op_Implicit(rect) seems to give the same result as (RectangleF)rect, where rect is of type Rectangle. If so, why is .op_Implicit recommended in most of the g.DrawString(.) examples I have seen? I'm asking because I get a compile error using .op_Implicit under Clr 2.0 (but not Clr 1.1) Error is
"cannot explicitly call operator or accessor"      

Question by:odenlou
    1 Comment
    LVL 22

    Accepted Solution

    If you are using c#, all you need in 2.0 is:
    RectangleF frect = rect;

    The conversion is implicit.

    If you are in vb, in 2.0:
    Dim frect As RectangleF = RectangleF.op_Implicit(rect)

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
    Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now