Click here to Skip to main content
15,909,941 members
Home / Discussions / C#
   

C#

 
GeneralRe: SqlDataReader reading beyond end of data Pin
TheJudeDude11-Jan-10 9:04
TheJudeDude11-Jan-10 9:04 
GeneralRe: SqlDataReader reading beyond end of data Pin
Jimmanuel11-Jan-10 9:49
Jimmanuel11-Jan-10 9:49 
AnswerRe: SqlDataReader reading beyond end of data Pin
Migounette8-Jan-10 12:34
Migounette8-Jan-10 12:34 
AnswerRe: SqlDataReader reading beyond end of data Pin
ajith-k-rajagopalan8-Jan-10 21:56
ajith-k-rajagopalan8-Jan-10 21:56 
GeneralRe: SqlDataReader reading beyond end of data Pin
TheJudeDude11-Jan-10 5:27
TheJudeDude11-Jan-10 5:27 
QuestionHelp on converting to XML Pin
amadaeliseo8-Jan-10 8:59
amadaeliseo8-Jan-10 8:59 
AnswerRe: Help on converting to XML Pin
Dimitri Witkowski8-Jan-10 22:08
Dimitri Witkowski8-Jan-10 22:08 
QuestionFeature from Java... is in C#? [modified] Pin
ika28-Jan-10 8:34
ika28-Jan-10 8:34 
Hi everybody,
I was looking a java code, and I would like to translate to C#, but I don't know if this feature exits in c#. The code is this:

public class Controller implements IController{

	private State state;
	private Speed speed;

	private ProductHandler producthandler = new ProductHandler (){

		@Override
		public void changeState(State newState) {
			state = newState;
		}

		@Override
		public Speed getSpeed() {
			return mds;
		}

		@Override
		public void send(Packet pk) {
			outputQueue.add(pk);
		}

		@Override
		public void setSpeed(Speed newSpeed) {
			speed = newSpeed;			
		}
		
	};


ProductHandler is a class defined inside other class "dinamically". ProductHandler can access Controller attributes. Is this possible in C#? I have done it with events and so... but its very dirty. Is this annonymous classes, am i right? Is there something equivalent in .net 2.0?

Regards

modified on Friday, January 8, 2010 2:50 PM

AnswerRe: Feature from Java... is in C#? Pin
harold aptroot8-Jan-10 9:09
harold aptroot8-Jan-10 9:09 
AnswerRe: Feature from Java... is in C#? Pin
Nicholas Butler8-Jan-10 9:12
sitebuilderNicholas Butler8-Jan-10 9:12 
GeneralRe: Feature from Java... is in C#? Pin
ika28-Jan-10 11:16
ika28-Jan-10 11:16 
AnswerRe: Feature from Java... is in C#? Pin
Pete O'Hanlon8-Jan-10 11:20
mvePete O'Hanlon8-Jan-10 11:20 
AnswerRe: Feature from Java... is in C#? Pin
N a v a n e e t h8-Jan-10 19:17
N a v a n e e t h8-Jan-10 19:17 
Questiongeneral help Pin
hotthoughtguy8-Jan-10 8:15
hotthoughtguy8-Jan-10 8:15 
AnswerRe: general help Pin
#realJSOP8-Jan-10 8:25
professional#realJSOP8-Jan-10 8:25 
GeneralRe: general help Pin
hotthoughtguy8-Jan-10 8:31
hotthoughtguy8-Jan-10 8:31 
AnswerRe: general help Pin
Bassam Saoud8-Jan-10 12:37
Bassam Saoud8-Jan-10 12:37 
QuestionMessage Removed Pin
8-Jan-10 6:50
Omoniyi Ogunderu8-Jan-10 6:50 
AnswerRe: DATABASE PATH DECOMPRESSION AND COMPRESSION. Pin
Saksida Bojan8-Jan-10 7:07
Saksida Bojan8-Jan-10 7:07 
QuestionRegarding C# Application Pin
xfailzx8-Jan-10 5:59
xfailzx8-Jan-10 5:59 
AnswerRe: Regarding C# Application Pin
Bassam Saoud8-Jan-10 12:39
Bassam Saoud8-Jan-10 12:39 
GeneralRe: Regarding C# Application Pin
xfailzx9-Jan-10 20:25
xfailzx9-Jan-10 20:25 
QuestionHow to parse special chars Pin
Aljaz1118-Jan-10 5:37
Aljaz1118-Jan-10 5:37 
AnswerRe: How to parse special chars Pin
Richard MacCutchan8-Jan-10 5:42
mveRichard MacCutchan8-Jan-10 5:42 
AnswerRe: How to parse special chars Pin
Luc Pattyn8-Jan-10 5:56
sitebuilderLuc Pattyn8-Jan-10 5:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.