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 694951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:54:34+00:00 2026-05-14T02:54:34+00:00

Recently I faced few interview questions.The interviewer asked the to give the detailed answer.

  • 0

Recently I faced few interview questions.The interviewer asked the to give the detailed answer.

1)Can we override a WCF service (Its is not OOPS overriding) ?.Explain the reason on either end. (WCF Related).

2)Can we override Page events (Page_Load())?.Explain reason.(ASP.NET related).

3)What is the primary responsibility of Pre_Init( page) event ,apart from user preference
setting,skinning?

4) Can we override Static methods.Explain the reason.(C# related)

can anyone help me to understand the reasons?

  • 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-14T02:54:34+00:00Added an answer on May 14, 2026 at 2:54 am
    1. You can’t really override WCF service operations. If your Service Contract class has two Service Operation methods with the same name but different parameters (i.e. legitimate C# overloads), WCF will throw an InvalidOperationException when the service is started. If you really want to do this, you can change the exposed operation name of one of the methods in the OperationContract attribute:

      [OperationContract(Name = "GetDataWithString")]
      public string GetData(string input)
      {
         ...
      }
      
      [OperationContract(Name = "GetDataWithNumber")]
      public string GetData(int input)
      {
         ...
      }
      
    2. You can override Page events in ASP.Net; this is pretty widely used and usually pretty crucial. You can either explicitly override the methods from the Page class your custom page inherits from, or you can name your methods in such a way that ASP.Net knows that they’re to be treated as overrides. For example, declaring a method in a page’s code-behind with the signature below will automatically override the Page_Init method.

      void Page_Init(object sender, EventArgs e)
      
    3. The Page_Init method is where ASP.Net starts tracking ViewState. This means that anything done to any of the page’s controls is now marked as Dirty in the ViewState StateBag, and so will be base-64 encoded and sent down to the client in the ViewState hidden input field, and therefore sent back to the server on a postback. Changing controls’ values before ViewState is being tracked will help stop ViewState getting too large. See this seminal article for more details.

    4. Only class instance methods can be marked as virtual, as the compiler-created v-table is attached to class instances. Static class members are not attached to instances but to the class itself, therefore there’s no way to override them. This article explains this in more detail, and gives some workarounds.

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

Sidebar

Related Questions

This is an interview question I faced recently. Given an array of 1 and
I recently faced an interview question related to LINQ. What is the use of
This is also one of the interview question i have faced recently. Description :
I faced this question in an interview recently. The original question was Given a
(This question is asked on Maven User mailing list too) I have recently faced
Ive been faced with a problem recently that I can't think of a good
We use apns-php to implement push notification service and have faced this problem recently:
I recently faced a problem with determining browsers' support for certain DOM features. One
I'm new in developing iOS app. So I've recently faced a problem with localization
Recently we faced the issue of flowscope values not being set across the flow,

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.