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

  • Home
  • SEARCH
  • 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 814941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T01:36:11+00:00 2026-05-15T01:36:11+00:00

I wonder that the obsolete attribute is checked at only runtime? Think that you

  • 0

I wonder that the obsolete attribute is checked at only runtime?

Think that you have two assemblies. Assembly A uses a method from Assembly B. After that we mark the method in Assembly B as obsolete which causes a compile time error when compiling assembly A.

No problem so far but the question is whether the older assembly A continue to work with new Assembly B or not? Thanks

  • 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-15T01:36:12+00:00Added an answer on May 15, 2026 at 1:36 am

    It depends on what you are doing. The [Obsolete] attribute is primarily for use at compile-time, but be aware that some parts of the runtime have different behavior when it is present (see below). It might cause problems, even to existing code that is not rebuilt, so we must conclude that NO, [Obsolete] is not checked only at compile time.

    For example, the code below will write Foo but not Bar:

    using System;
    using System.Xml.Serialization;
    public class Data
    {
        public int Foo { get; set; }
        [Obsolete] public int Bar {get;set;}
    
        static void Main()
        {
            var data = new Data { Foo = 1, Bar = 2 };
            new XmlSerializer(data.GetType()).Serialize(Console.Out, data);
        }
    }
    

    (XmlSerializer is a runtime too – not part of the compiler)

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

Sidebar

Related Questions

I have learned so much from http://www.summerofnhibernate.com/ nhibernate screen casts that i wonder why
Coming from C++, I find generic programming indispensable. I wonder how people approach that
this is a question that when programming I always wonder: What to use when
I always wonder why compilers can't figure out simple things that are obvious to
I wonder if I could write a program in the C -programming language that
I know that this is somewhat subjective, but I wonder if there is a
I own a website and I wonder if there is a script that get
I wonder, why the hell... did the VS team consider that NOT finding a
I'm building a app that needs to perform calculations on money. I wonder how
Wonder what the difference between: static PROCESSWALK pProcess32First=(PROCESSWALK)GetProcAddress(hKernel,Process32First); ... pProcess32First(...); what is hKernel? Look

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.