Red Gate forums :: View topic - Support for C# 'Checked'.
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
.Net Reflector 6.x and .NET Reflector 6.x Pro
.Net Reflector 6.x and .NET Reflector 6.x Pro forum

Support for C# 'Checked'.

Search in .Net Reflector 6.x and .NET Reflector 6.x Pro forum
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Jump to:  
Author Message
high6



Joined: 19 Sep 2008
Posts: 9

PostPosted: Mon Dec 06, 2010 6:33 am    Post subject: Support for C# 'Checked'. Reply with quote

I noticed that reflector does not add a checked scope when there are instructions like 'add.ovf', 'sub.ovf', etc.

Code:
void A()
        {
            int a = 5;
            int b = 7;
            int c = a + b;
        }
        void B()
        {
            int a = 5;
            int b = 7;
            checked
            {
                int c = a + b;
            }
        }
        void D()
        {
            uint a = 5;
            uint b = 7;
            checked
            {
                uint c = a + b;
            }
        }


Compiled that and reflector shows.

Code:
    private void A()
    {
        int a = 5;
        int b = 7;
        int c = a + b;
    }
    private void B()
    {
        int a = 5;
        int b = 7;
        int c = a + b;
    }
    private void D()
    {
        uint a = 5;
        uint b = 7;
        uint c = a + b;
    }


Even though B and D use add.ovf and add.ovf.un
Back to top
View user's profile Send private message
Clive Tong



Joined: 04 Dec 2008
Posts: 283

PostPosted: Mon Dec 06, 2010 9:15 am    Post subject: Reply with quote

Thanks for reporting it. I've logged it as RP-781.
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies. All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group