Posted on 2005-04-08
Last Modified: 2010-04-16

I was asked in an interview if C# uses makros or a preprocessor? Now...i had no idea what those things are...i just answered "with C# you can use pre-processing the region one i saw generated by Visual it's not macros"

what are the macros and how are they used?

Question by:Kokas79
    LVL 5

    Expert Comment

    if you have coded in c, then its the directive statement which usually comes in the begining like
    #define ADD(x,y) x+y

    So wherever in the code you have ADD(x,y) it is replaced by x+y while compiling.
    Note x and y can be any integers.
    YOu can also define constant using this directive.

    Similarly other preprocessors are #include
    used to import other code/header files.
    LVL 8

    Accepted Solution

    check this if it is helpful


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Suggested Solutions

    Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
    This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
    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.
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    760 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

    8 Experts available now in Live!

    Get 1:1 Help Now