---
title: "Can be declare a static function as virtual?"  
description: "Can be declare a static function as virtual?"  
author: "Somesh"  
published: 2011-03-29  
updated: 2011-03-29  
canonical: https://www.mindstick.com/forum/212/can-be-declare-a-static-function-as-virtual  
category: "oops"  
tags: ["oops"]  
reading_time: 1 minute  

---

# Can be declare a static function as virtual?

Can be declare a [static function](https://www.mindstick.com/forum/469/can-we-declare-a-static-function-as-virtual) as [virtual](https://yourviews.mindstick.com/view/81341/the-oh-so-fight-for-democracy-virtual-rally-scenes)?\
please give the reason also.\
thanks

## Replies

### Reply by Amit Singh

**NO,**\
Reason:\
The virtual [function](https://www.mindstick.com/articles/13001/multi-statement-table-valued-user-defined-function-in-sql-server) mechanism is used on the specific object that determines which virtual function to call. Since the [static](https://www.mindstick.com/articles/12098/the-static-keyword-the-static-methods) functions are not any way related to objects, they cannot be declared as virtual.


---

Original Source: https://www.mindstick.com/forum/212/can-be-declare-a-static-function-as-virtual

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
