locked
MSDN Forums: A new way of posting Questions and Answering. RRS feed

  • General discussion

  • Hi, as a MSDN Forums member, I would love to share some incredible suggestions that might change the way we replay to “threads” and the way we post questions.

    First off, posting a question shall be important to know where the problem might be, and members shall also explain it more deeply.

    A [not] so good and a not so accepted question:

    Hi,

    I have some problem with the stack, and I do not know!
    Can anybody help me?

    Have a nice day…

    While the above question might take time to answer we shall take a look at the new way of posting a question at MSDN forums.


    While the above question might take time to answer we shall take a look at the new way of posting a question at MSDN forums.

    A good and accepted question:

    Hi,

    Overview/Brief History
    We are working on a business application, the application is a sort of business customer register program. The application is special designed for our customers and our own employees.

    PC/Computer Information
    Windows Operating System: Windows® 7 Ultimate.
    System Type: 32-bit operating system.
    Total RAM memory: 2GB.
    CPU: AMD64, 2.10 GHz.
     
    Visual Studio and .NET version
    Visual Studio Edition: Microsoft® Visual Studio® 2008 Professional.
    .NET Version: Microsoft® .NET® Framework 2.0.

    Problem
    The problem occurred in the stack heap, is said that the stack was overloaded for some reason.
    There also appeared a “StackOverflowExcpetion” message saying that is was “unhandled”.  

    Code-snippet


    Screenshot

    Here the user can add a screenshot to provide more details.

    Have a nice day…

     

    Best regards,
    John

     


    Code Snippet
    1. using System;

    2. using System.Collections.Generic;

    3. using System.Linq;

    4. using System.Text;

    5. namespace Work

    6. {

    7.     class Program
    8.     {
    9.        static void Main(string[] args)
    10.        {
    11.             RunProcA(); 

    12.        }
    13.       static void RunProcA()
    14.       {
    15.            RunProcB();   
    16.       } 
    17.       static void RunProcB() 
    18.       {
    19.           RunProcA();

    20.       }       
    21.    }
    22. }



    Then the way a moderator or any other active supporter should “answer”. 

    Hi John:

    Welcome to MSDN Forums community.

    Information
    Well, the stack overflow exception occurred since you did not catch the exception. Also, I must add, when a stack overflow exception occurs, then it means that too much stack has been laid down.   

    Solution to solve this problem
    I’ve check your code. And I think you shall implement my solution.
    Further reading and Helpful links
    Below is a list of some helpful links that I added.

    I hope the above information was helpful…

    If you need further assistance, please feel free to let me know.

    Have a nice day…

     


    Best regards,
    Peter

    If you have any feedback on our support, please contact msdnmg@microsoft.com

    Code Snippet: Your code
    1. using System;

    2. using System.Collections.Generic;

    3. using System.Linq;

    4. using System.Text;

    5. namespace Work

    6. {

    7.     class Program
    8.     {
    9.        static void Main(string[] args)
    10.        {
    11.             RunProcA(); 

    12.        }
    13.       static void RunProcA()
    14.       {
    15.            RunProcB();   
    16.       } 
    17.       static void RunProcB() 
    18.       {
    19.           RunProcA();

    20.       }       
    21.    }
    22. }


    Code Snippet: Answer
    1. using System;

    2. using System.Collections.Generic;

    3. using System.Linq;

    4. using System.Text;

    5. namespace Work

    6. {

    7.     class Program
    8.     {
    9.        static void Main(string[] args)
    10.        {
    11.             RunProcA(); 

    12.        }
    13.       static void RunProcA()
    14.       {
    15.            RunProcB();   
    16.       } 
    17.       static void RunProcB() 
    18.       {
    19.          

    20.       }       
    21.    }
    22. }


    I hope the MSDN Forums managers and Forums designers see this and I hope they will implement this idea…

    Have a nice day…

    Best regards,
    Fisnik


    Coder24.com
    Wednesday, September 23, 2009 6:11 PM

All replies

  • Hi again:

    I am sorry, I hope you might understand this smart concept.

    Have a nice day...

    Best regards,
    Fisnik
    Coder24.com
    Wednesday, September 23, 2009 6:12 PM