Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4032288
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T11:42:10+00:00 2026-05-20T11:42:10+00:00

I just had this idea for something that I’d love to be able to

  • 0

I just had this idea for something that I’d love to be able to use:

Let’s say I have to fix a bug and I decide to write an ugly code line that fixes the immediate problem – but only because I promise myself that I will soon find the time to perform a proper refactoring.

I want to be able to somehow mark that code line as "Expired in" and add a date – so that if the code is compiled some time after that date there will be a compilation error/warning with a proper message.

Any suggestions? It must be possible to perform – maybe using some complicated #IF or some options in visual studio?

I’m using VS 2005 – mainly for C#.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T11:42:11+00:00Added an answer on May 20, 2026 at 11:42 am

    You could write comment lines in the form

    // Expires on 2011/07/01
    

    and add a prebuild step which does a solution-wide replace of these lines by something like

    #error Code expired on 2011/07/01
    

    for all lines that contain a date before the current day. For this prebuild step you would need to write a short program (probably using regular expressions and some date comparision logic)

    This step could also be performed by a VS macro, which allows for easier access to all files fo the solution but has the disadvantage that it must be installed and run on all VS installations where your project is compiled.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say I have a higher kinded type SuperMap[Key[_],Value[_]]`. Suppose now that I had something
I just got this question on an interview and had no idea how to
I had assume I could just do this, but I don't have a way
I was just reading this article and it mentions that some organization had an
Seems like just yesterday I had this same problem with Play! v1. After trying
I thought I had this figured out but it turns out I'm just deleting
Hey This is my login script, using PHP5 and MYSQLi, I just had help
So just this week I had the opportunity to re-build my development machine and
Just wondering if you had any thoughts on this problem. I want to make
I just added this to my web.xml on my JBOSS server. But it had

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.