473,387 Members | 1,530 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Interface vs memebers


Hello,
I would like to know if it is possible to inforce specific members
implementation just as methods inforcment of methods implementaion in
Interface?
Thank u!
*** Sent via Developersdex http://www.developersdex.com ***
Jan 3 '08 #1
4 1194
Hello csharpula,

not quite understood what u want.
Force specific method from interface to be impemented?

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
ccHello,
ccI would like to know if it is possible to inforce specific members
ccimplementation just as methods inforcment of methods implementaion
ccin
ccInterface?
ccThank u!
cc*** Sent via Developersdex http://www.developersdex.com ***
cc>
Jan 3 '08 #2
csharpula csharp <cs*******@yahoo.comwrote:
I would like to know if it is possible to inforce specific members
implementation just as methods inforcment of methods implementaion in
Interface?
Methods *are* members (as are properties and events, which can also be
part of interfaces). Do you mean enforcing fields? If so, there isn't a
way of doing it - and a good thing too, as it's generally a bad idea to
make fields non-private anyway.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
Jan 3 '08 #3
csharpula csharp wrote:
>
Hello,
I would like to know if it is possible to inforce specific members
implementation just as methods inforcment of methods implementaion in
Interface?
You can require implementation of properties:

interface IMyIntf
{
int MyProp { get; set; }
}

-- Barry

--
http://barrkel.blogspot.com/
Jan 3 '08 #4
Hi,

As the other said it's not clear what you want.

You could make your class abstract and thus force the implementation of
members in a derived class.

If this is not what you want, just post back with more details

--
Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.
"csharpula csharp" <cs*******@yahoo.comwrote in message
news:O6**************@TK2MSFTNGP04.phx.gbl...
>
Hello,
I would like to know if it is possible to inforce specific members
implementation just as methods inforcment of methods implementaion in
Interface?
Thank u!
*** Sent via Developersdex http://www.developersdex.com ***

Jan 3 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Roy Pereira | last post by:
I have an application that is composed of a set of "Content" dlls and a viewer application. The viewer calls a standard set of functions that are present in all the dlls. I maintain this by...
9
by: Anon Email | last post by:
Hi people, I'm learning about header files in C++. The following is code from Bartosz Milewski: // Code const int maxStack = 16; class IStack
1
by: ravinder thakur | last post by:
hi all experts, i have a structure with the constant memebers such as one given below: typedef struct { const int cbcode; int cberror; } xtsetplatestaterec;
4
by: Doug | last post by:
I am working on an existing .NET (C Sharp) component that had a com interface that was used by a VB component. When it was originally written, it had the SSEAssemblyCom class below - minus the two...
3
by: zlst | last post by:
Many technological innovations rely upon User Interface Design to elevate their technical complexity to a usable product. Technology alone may not win user acceptance and subsequent marketability....
6
by: Alex Sedow | last post by:
Example 1 interface I { string ToString(); } public class C : I { public void f() {
20
by: Ole Hanson | last post by:
I am accessing my database through an interface, to allow future substitution of the physical datastore - hence I would like to declare in my Interface that my DAL-objects implementing the...
0
by: YellowFin Announcements | last post by:
Introduction Usability and relevance have been identified as the major factors preventing mass adoption of Business Intelligence applications. What we have today are traditional BI tools that...
15
by: Xah Lee | last post by:
On Java's Interface Xah Lee, 20050223 In Java the language, there's this a keyword “interface”. In a functional language, a function can be specified by its name and parameter specs....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.