Current filter:
                                You should refresh the page.
                                0
                                  • Consider the following code:

                                    private void Foo(short x)
                                    {
                                        Foo((short)y);
                                    }

                                    If I use Declare Local on 'y', it produces a local variable of type 'object' assigned to null. If I remove the explicit typecast to 'short' it appropriately produces a variable of type 'short'.

                                    Expected Results:

                                    A 'short' should be produced with or without the typecast.

                                You must  log in  or  register  to leave an answer

                                Is your intention to post an answer to your own question?

                                • If so, then proceed.
                                • If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
                                • If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.