Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
What does the following line of code do:

public class AudioRecorder : IAudioRecorder

I got this sample code that im looking at but i have not figured out but is the purpose of it.

Another question:
Is there any difference between

Class audioRecorder and Public class audioRecorder

Thanks In advance guys
Posted

C#
public class AudioRecorder : IAudioRecorder


It declares/defines a class named AudioRecorder that implements the interface named IAudioRecorder.

C#
class AudioRecorder {}
public class AudioRecorder{}


The former defaults to an internal class, the latter explicitly declares it as a public class.

BTW what you are asking is pretty basic C# stuff, so perhaps you need to start with an introductory book on the subject before you venture out into actually using the language.
 
Share this answer
 
v2
Comments
Chirry 1-Nov-10 11:06am    
Thanksss.
Im aware that those are simple stuff of C#, im just new to this and i got a short time to implement something
for now i will try to understand parts of the language, i know that is not the right way to do it, but i got to try
Thanks for ur answer and tip.
IAudioRecorder is interface & AudioRecorder is the implementation of the interface. AudioRecorder has to implement all the properties & method of the interface IAudioRecorder. And there is a difference between Class audioRecorder and Public class audioRecorder. If you do not declare a class public, it will not be accessible outside of the namespace. Without public it is only a internal class which is hidden from outside of the namespace.
 
Share this answer
 
Comments
Chirry 1-Nov-10 11:08am    
Thankss very muchhh very helpfull information
shakil0304003 1-Nov-10 11:26am    
welcome :) you can Accept Answer if it Helped.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900