Click here to Skip to main content
15,895,011 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
AnswerRe: This code will self-destruct in... Pin
abmv16-Oct-17 7:15
professionalabmv16-Oct-17 7:15 
AnswerRe: This code will self-destruct in... Pin
kmoorevs16-Oct-17 8:13
kmoorevs16-Oct-17 8:13 
GeneralRe: This code will self-destruct in... Pin
Jeremy Falcon16-Oct-17 8:19
professionalJeremy Falcon16-Oct-17 8:19 
AnswerRe: This code will self-destruct in... Pin
CodeWraith16-Oct-17 8:36
CodeWraith16-Oct-17 8:36 
AnswerRe: This code will self-destruct in... Pin
GKP199216-Oct-17 18:01
professionalGKP199216-Oct-17 18:01 
AnswerRe: This code will self-destruct in... Pin
Phil J Pearson16-Oct-17 22:33
Phil J Pearson16-Oct-17 22:33 
AnswerRe: This code will self-destruct in... Pin
Marc Clifton17-Oct-17 1:55
mvaMarc Clifton17-Oct-17 1:55 
AnswerRe: This code will self-destruct in... Pin
Dan Neely17-Oct-17 2:55
Dan Neely17-Oct-17 2:55 
If the intent is just to make sure the temp code is removed from your code base after it's done its job you could just put something in the codebase to trigger a build error in debug after enough time's past that you think it should be done to remind you to remove it. I've found a kludge[^] that is supposed to work like a C++ static assert. Wrap it in an #if DEBUG and you should be good to go.
C#
public void TempCodeExpiredAssert(DateTime expirationDate)
{
    #if DEBUG
    byte a = DateTime.Now > expirationDate ? 0 : -1;

    #endif
}

PS, code is totally untested to avoid the no programming questions in the lounge rule.

Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes:
Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes:
Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes:
Roll eyes | :rolleyes: Roll eyes | :rolleyes:
Roll eyes | :rolleyes: Roll eyes | :rolleyes:
Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes:
Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes:
Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes:
Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes:
Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes:
Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes:
Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes:
Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes:
Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes:
Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes:
Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes:
Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes:
Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes:
Roll eyes | :rolleyes: Roll eyes | :rolleyes:
Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes:
Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes:
Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes: Roll eyes | :rolleyes:

PPS I reported the bug generating all the whitespace above my rolling eyes something like a year ago.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius

Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt

GeneralRe: This code will self-destruct in... Pin
Chris Maunder17-Oct-17 9:38
cofounderChris Maunder17-Oct-17 9:38 
GeneralRe: This code will self-destruct in... Pin
Dan Neely17-Oct-17 9:53
Dan Neely17-Oct-17 9:53 
AnswerRe: This code will self-destruct in... Pin
loctrice17-Oct-17 4:16
professionalloctrice17-Oct-17 4:16 
GeneralRe: This code will self-destruct in... Pin
Chris Maunder17-Oct-17 4:19
cofounderChris Maunder17-Oct-17 4:19 
AnswerRe: This code will self-destruct in... Pin
Bruce Patin17-Oct-17 4:29
Bruce Patin17-Oct-17 4:29 
AnswerRe: This code will self-destruct in... Pin
Bassam Abdul-Baki17-Oct-17 4:45
professionalBassam Abdul-Baki17-Oct-17 4:45 
GeneralRe: This code will self-destruct in... Pin
Chris Maunder17-Oct-17 4:46
cofounderChris Maunder17-Oct-17 4:46 
GeneralRe: This code will self-destruct in... Pin
Bassam Abdul-Baki17-Oct-17 5:40
professionalBassam Abdul-Baki17-Oct-17 5:40 
AnswerRe: This code will self-destruct in... Pin
FredWah17-Oct-17 7:51
FredWah17-Oct-17 7:51 
AnswerRe: This code will self-destruct in... Pin
jschell17-Oct-17 8:03
jschell17-Oct-17 8:03 
AnswerRe: This code will self-destruct in... Pin
thewazz17-Oct-17 14:43
professionalthewazz17-Oct-17 14:43 
AnswerRe: This code will self-destruct in... Pin
S Douglas19-Oct-17 11:47
professionalS Douglas19-Oct-17 11:47 
GeneralRe: This code will self-destruct in... Pin
Chris Maunder19-Oct-17 14:13
cofounderChris Maunder19-Oct-17 14:13 
GeneralTerrible joke of the day Pin
Duncan Edwards Jones16-Oct-17 5:40
professionalDuncan Edwards Jones16-Oct-17 5:40 
GeneralRe: Terrible joke of the day Pin
den2k8816-Oct-17 5:44
professionalden2k8816-Oct-17 5:44 
GeneralRe: Terrible joke of the day Pin
megaadam16-Oct-17 5:46
professionalmegaadam16-Oct-17 5:46 
GeneralRe: Terrible joke of the day Pin
lopatir16-Oct-17 6:14
lopatir16-Oct-17 6:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.