Code Generation for interface…Quick Actions and Refactorings feature in Visual Studio 2015












-4















Click here for demo of problem
This is happening for Visual Studio Community 2015
Version 14.0.25431.01 Update 3
On Framework 4.7



Here is what the book says (John Sharp, Microsoft Visual Studio, Step by Step, Eight Edition, Page 427.)



"Return to the definition of the TreeEnumerator class. In the class declaration, hover over the text IEnumerator. On the drop-down context menu that appears (with a lightbulb icon)--(I assume he means after you right-click)--click Implement Interface Explicitly".



when I right click, I don't see "implement interface explicitly" but I do see "Quick Actions Refactorings", and because another link (which I am trying to find) says this is the right option, I chose it, but nothing really happens.... As if I did nothing...



using System;



public class TreeEnumorator<TItem> : IEnumerator<TItem> where TItem : IComparable<TItem>
{
private TreeEnumorator<TItem> currentData = null;
private TItem currentItem = default(TItem);
private Queue<TItem> enumData = null;

//***** when dealing with a generic class, the constructor does not have <TYPE>
//NOTICE the name of the constructor is not TreeEnumorator<TItem>
public TreeEnumorator(Tree<TItem> data)
{
this.currentData = data;
}

private void populate(Queue<TItem> enumQueue, Tree<TItem> tree)
{
if (tree.LeftTree != null)
{
populate(enumQueue, tree.LeftTree);
}

enumQueue.Enqueu(tree.NodeData);

if (tree.RightTree != null)
{
populate(enumQueue, tree.RightTree);
}

}









share|improve this question




















  • 1





    This works fine for me. At a minimum, we would need to know the exact version of VS2015 (e.g. Update 1, etc.) to offer suggestions.

    – BJ Myers
    Nov 26 '18 at 2:30











  • I didn't get it from a link. I got it from Jhon Sharp's book, Eighth edition of Microsoft C# Step by Step. Page 427. I can paste that into the question. Gimee a minute. Please vote it back up. I will fix the question....

    – dogbone
    Nov 26 '18 at 2:30






  • 1





    This website is quick to close your account, That is not true at all. I am not sure why you thought that.

    – mjwills
    Nov 26 '18 at 4:06











  • Please use LiceCap or similar to show us an animated gif of you right-clicking and selecting Quick Actions Refactorings and attached the gif to your question.

    – mjwills
    Nov 26 '18 at 4:07






  • 1





    Change the top of the file to be using System; using System.Collections.Generic;.

    – mjwills
    Nov 26 '18 at 5:26
















-4















Click here for demo of problem
This is happening for Visual Studio Community 2015
Version 14.0.25431.01 Update 3
On Framework 4.7



Here is what the book says (John Sharp, Microsoft Visual Studio, Step by Step, Eight Edition, Page 427.)



"Return to the definition of the TreeEnumerator class. In the class declaration, hover over the text IEnumerator. On the drop-down context menu that appears (with a lightbulb icon)--(I assume he means after you right-click)--click Implement Interface Explicitly".



when I right click, I don't see "implement interface explicitly" but I do see "Quick Actions Refactorings", and because another link (which I am trying to find) says this is the right option, I chose it, but nothing really happens.... As if I did nothing...



using System;



public class TreeEnumorator<TItem> : IEnumerator<TItem> where TItem : IComparable<TItem>
{
private TreeEnumorator<TItem> currentData = null;
private TItem currentItem = default(TItem);
private Queue<TItem> enumData = null;

//***** when dealing with a generic class, the constructor does not have <TYPE>
//NOTICE the name of the constructor is not TreeEnumorator<TItem>
public TreeEnumorator(Tree<TItem> data)
{
this.currentData = data;
}

private void populate(Queue<TItem> enumQueue, Tree<TItem> tree)
{
if (tree.LeftTree != null)
{
populate(enumQueue, tree.LeftTree);
}

enumQueue.Enqueu(tree.NodeData);

if (tree.RightTree != null)
{
populate(enumQueue, tree.RightTree);
}

}









share|improve this question




















  • 1





    This works fine for me. At a minimum, we would need to know the exact version of VS2015 (e.g. Update 1, etc.) to offer suggestions.

    – BJ Myers
    Nov 26 '18 at 2:30











  • I didn't get it from a link. I got it from Jhon Sharp's book, Eighth edition of Microsoft C# Step by Step. Page 427. I can paste that into the question. Gimee a minute. Please vote it back up. I will fix the question....

    – dogbone
    Nov 26 '18 at 2:30






  • 1





    This website is quick to close your account, That is not true at all. I am not sure why you thought that.

    – mjwills
    Nov 26 '18 at 4:06











  • Please use LiceCap or similar to show us an animated gif of you right-clicking and selecting Quick Actions Refactorings and attached the gif to your question.

    – mjwills
    Nov 26 '18 at 4:07






  • 1





    Change the top of the file to be using System; using System.Collections.Generic;.

    – mjwills
    Nov 26 '18 at 5:26














-4












-4








-4








Click here for demo of problem
This is happening for Visual Studio Community 2015
Version 14.0.25431.01 Update 3
On Framework 4.7



Here is what the book says (John Sharp, Microsoft Visual Studio, Step by Step, Eight Edition, Page 427.)



"Return to the definition of the TreeEnumerator class. In the class declaration, hover over the text IEnumerator. On the drop-down context menu that appears (with a lightbulb icon)--(I assume he means after you right-click)--click Implement Interface Explicitly".



when I right click, I don't see "implement interface explicitly" but I do see "Quick Actions Refactorings", and because another link (which I am trying to find) says this is the right option, I chose it, but nothing really happens.... As if I did nothing...



using System;



public class TreeEnumorator<TItem> : IEnumerator<TItem> where TItem : IComparable<TItem>
{
private TreeEnumorator<TItem> currentData = null;
private TItem currentItem = default(TItem);
private Queue<TItem> enumData = null;

//***** when dealing with a generic class, the constructor does not have <TYPE>
//NOTICE the name of the constructor is not TreeEnumorator<TItem>
public TreeEnumorator(Tree<TItem> data)
{
this.currentData = data;
}

private void populate(Queue<TItem> enumQueue, Tree<TItem> tree)
{
if (tree.LeftTree != null)
{
populate(enumQueue, tree.LeftTree);
}

enumQueue.Enqueu(tree.NodeData);

if (tree.RightTree != null)
{
populate(enumQueue, tree.RightTree);
}

}









share|improve this question
















Click here for demo of problem
This is happening for Visual Studio Community 2015
Version 14.0.25431.01 Update 3
On Framework 4.7



Here is what the book says (John Sharp, Microsoft Visual Studio, Step by Step, Eight Edition, Page 427.)



"Return to the definition of the TreeEnumerator class. In the class declaration, hover over the text IEnumerator. On the drop-down context menu that appears (with a lightbulb icon)--(I assume he means after you right-click)--click Implement Interface Explicitly".



when I right click, I don't see "implement interface explicitly" but I do see "Quick Actions Refactorings", and because another link (which I am trying to find) says this is the right option, I chose it, but nothing really happens.... As if I did nothing...



using System;



public class TreeEnumorator<TItem> : IEnumerator<TItem> where TItem : IComparable<TItem>
{
private TreeEnumorator<TItem> currentData = null;
private TItem currentItem = default(TItem);
private Queue<TItem> enumData = null;

//***** when dealing with a generic class, the constructor does not have <TYPE>
//NOTICE the name of the constructor is not TreeEnumorator<TItem>
public TreeEnumorator(Tree<TItem> data)
{
this.currentData = data;
}

private void populate(Queue<TItem> enumQueue, Tree<TItem> tree)
{
if (tree.LeftTree != null)
{
populate(enumQueue, tree.LeftTree);
}

enumQueue.Enqueu(tree.NodeData);

if (tree.RightTree != null)
{
populate(enumQueue, tree.RightTree);
}

}






c# visual-studio visual-studio-2015






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 26 '18 at 4:44







dogbone

















asked Nov 26 '18 at 2:10









dogbonedogbone

12




12








  • 1





    This works fine for me. At a minimum, we would need to know the exact version of VS2015 (e.g. Update 1, etc.) to offer suggestions.

    – BJ Myers
    Nov 26 '18 at 2:30











  • I didn't get it from a link. I got it from Jhon Sharp's book, Eighth edition of Microsoft C# Step by Step. Page 427. I can paste that into the question. Gimee a minute. Please vote it back up. I will fix the question....

    – dogbone
    Nov 26 '18 at 2:30






  • 1





    This website is quick to close your account, That is not true at all. I am not sure why you thought that.

    – mjwills
    Nov 26 '18 at 4:06











  • Please use LiceCap or similar to show us an animated gif of you right-clicking and selecting Quick Actions Refactorings and attached the gif to your question.

    – mjwills
    Nov 26 '18 at 4:07






  • 1





    Change the top of the file to be using System; using System.Collections.Generic;.

    – mjwills
    Nov 26 '18 at 5:26














  • 1





    This works fine for me. At a minimum, we would need to know the exact version of VS2015 (e.g. Update 1, etc.) to offer suggestions.

    – BJ Myers
    Nov 26 '18 at 2:30











  • I didn't get it from a link. I got it from Jhon Sharp's book, Eighth edition of Microsoft C# Step by Step. Page 427. I can paste that into the question. Gimee a minute. Please vote it back up. I will fix the question....

    – dogbone
    Nov 26 '18 at 2:30






  • 1





    This website is quick to close your account, That is not true at all. I am not sure why you thought that.

    – mjwills
    Nov 26 '18 at 4:06











  • Please use LiceCap or similar to show us an animated gif of you right-clicking and selecting Quick Actions Refactorings and attached the gif to your question.

    – mjwills
    Nov 26 '18 at 4:07






  • 1





    Change the top of the file to be using System; using System.Collections.Generic;.

    – mjwills
    Nov 26 '18 at 5:26








1




1





This works fine for me. At a minimum, we would need to know the exact version of VS2015 (e.g. Update 1, etc.) to offer suggestions.

– BJ Myers
Nov 26 '18 at 2:30





This works fine for me. At a minimum, we would need to know the exact version of VS2015 (e.g. Update 1, etc.) to offer suggestions.

– BJ Myers
Nov 26 '18 at 2:30













I didn't get it from a link. I got it from Jhon Sharp's book, Eighth edition of Microsoft C# Step by Step. Page 427. I can paste that into the question. Gimee a minute. Please vote it back up. I will fix the question....

– dogbone
Nov 26 '18 at 2:30





I didn't get it from a link. I got it from Jhon Sharp's book, Eighth edition of Microsoft C# Step by Step. Page 427. I can paste that into the question. Gimee a minute. Please vote it back up. I will fix the question....

– dogbone
Nov 26 '18 at 2:30




1




1





This website is quick to close your account, That is not true at all. I am not sure why you thought that.

– mjwills
Nov 26 '18 at 4:06





This website is quick to close your account, That is not true at all. I am not sure why you thought that.

– mjwills
Nov 26 '18 at 4:06













Please use LiceCap or similar to show us an animated gif of you right-clicking and selecting Quick Actions Refactorings and attached the gif to your question.

– mjwills
Nov 26 '18 at 4:07





Please use LiceCap or similar to show us an animated gif of you right-clicking and selecting Quick Actions Refactorings and attached the gif to your question.

– mjwills
Nov 26 '18 at 4:07




1




1





Change the top of the file to be using System; using System.Collections.Generic;.

– mjwills
Nov 26 '18 at 5:26





Change the top of the file to be using System; using System.Collections.Generic;.

– mjwills
Nov 26 '18 at 5:26












1 Answer
1






active

oldest

votes


















0














The code I had created was put in my Solution Items folder.
It was not put in my project folder.
Once I moved it, it works as normal...






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53473938%2fcode-generation-for-interface-quick-actions-and-refactorings-feature-in-visua%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    The code I had created was put in my Solution Items folder.
    It was not put in my project folder.
    Once I moved it, it works as normal...






    share|improve this answer




























      0














      The code I had created was put in my Solution Items folder.
      It was not put in my project folder.
      Once I moved it, it works as normal...






      share|improve this answer


























        0












        0








        0







        The code I had created was put in my Solution Items folder.
        It was not put in my project folder.
        Once I moved it, it works as normal...






        share|improve this answer













        The code I had created was put in my Solution Items folder.
        It was not put in my project folder.
        Once I moved it, it works as normal...







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 1 '18 at 16:58









        dogbonedogbone

        12




        12
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53473938%2fcode-generation-for-interface-quick-actions-and-refactorings-feature-in-visua%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Costa Masnaga

            Fotorealismo

            Sidney Franklin