Click here to Skip to main content
15,907,677 members
Home / Discussions / C#
   

C#

 
Answer[SOLVED] TableLayoutPanel and .. surprise surprise .. weird behaviour 8) Pin
Emanuele Bonin30-Jan-16 2:17
Emanuele Bonin30-Jan-16 2:17 
GeneralRe: [SOLVED] TableLayoutPanel and .. surprise surprise .. weird behaviour 8) Pin
BillWoodruff30-Jan-16 2:46
professionalBillWoodruff30-Jan-16 2:46 
GeneralRe: [SOLVED] TableLayoutPanel and .. surprise surprise .. weird behaviour 8) Pin
Emanuele Bonin30-Jan-16 6:18
Emanuele Bonin30-Jan-16 6:18 
AnswerRe: TableLayoutPanel and .. surprise surprise .. weird behaviour 8) Pin
BillWoodruff30-Jan-16 2:39
professionalBillWoodruff30-Jan-16 2:39 
QuestionSubscribe to property changes using Reactive Extensions Pin
Kenneth Haugland29-Jan-16 2:18
mvaKenneth Haugland29-Jan-16 2:18 
AnswerRe: Subscribe to property changes using Reactive Extensions Pin
Pete O'Hanlon29-Jan-16 3:25
mvePete O'Hanlon29-Jan-16 3:25 
GeneralRe: Subscribe to property changes using Reactive Extensions Pin
Kenneth Haugland29-Jan-16 4:47
mvaKenneth Haugland29-Jan-16 4:47 
GeneralRe: Subscribe to property changes using Reactive Extensions Pin
Richard Deeming29-Jan-16 5:03
mveRichard Deeming29-Jan-16 5:03 
Kenneth Haugland wrote:
The last Select(evt => getter(target)) I simpy dont understand at all.

The FromEvent method returns an IObservable<TEventArgs> instance. Every property change would push the EventArgs to the observers, which wouldn't be particularly useful.

The Select converts the returned value to an IObservable<TResult>, where TResult is the type of the property you're observing. It does this by ignoring the EventArgs, and retrieving the current value of the property instead.

NB: Since it doesn't use a WeakReference, the returned object will keep the target alive, which could potentially cause a memory leak.

It looks like the FromEventPattern method is a better fit. Smile | :)



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: Subscribe to property changes using Reactive Extensions Pin
Kenneth Haugland29-Jan-16 5:22
mvaKenneth Haugland29-Jan-16 5:22 
AnswerRe: Subscribe to property changes using Reactive Extensions Pin
Richard Deeming29-Jan-16 3:31
mveRichard Deeming29-Jan-16 3:31 
GeneralRe: Subscribe to property changes using Reactive Extensions Pin
Kenneth Haugland29-Jan-16 4:56
mvaKenneth Haugland29-Jan-16 4:56 
AnswerRe: Subscribe to property changes using Reactive Extensions Pin
Sascha Lefèvre29-Jan-16 3:49
professionalSascha Lefèvre29-Jan-16 3:49 
GeneralRe: Subscribe to property changes using Reactive Extensions Pin
Kenneth Haugland29-Jan-16 4:59
mvaKenneth Haugland29-Jan-16 4:59 
GeneralRe: Subscribe to property changes using Reactive Extensions Pin
Sascha Lefèvre29-Jan-16 5:30
professionalSascha Lefèvre29-Jan-16 5:30 
GeneralRe: Subscribe to property changes using Reactive Extensions Pin
Kenneth Haugland29-Jan-16 5:51
mvaKenneth Haugland29-Jan-16 5:51 
QuestionEnable / Disable DNS Client service (c#) Pin
Member 1041097228-Jan-16 22:21
Member 1041097228-Jan-16 22:21 
AnswerRe: Enable / Disable DNS Client service (c#) Pin
Nathan Minier29-Jan-16 2:05
professionalNathan Minier29-Jan-16 2:05 
GeneralRe: Enable / Disable DNS Client service (c#) Pin
Member 1041097229-Jan-16 5:21
Member 1041097229-Jan-16 5:21 
GeneralRe: Enable / Disable DNS Client service (c#) Pin
Nathan Minier29-Jan-16 5:28
professionalNathan Minier29-Jan-16 5:28 
AnswerRe: Enable / Disable DNS Client service (c#) Pin
Eddy Vluggen29-Jan-16 2:19
professionalEddy Vluggen29-Jan-16 2:19 
GeneralRe: Enable / Disable DNS Client service (c#) Pin
Member 1041097229-Jan-16 5:25
Member 1041097229-Jan-16 5:25 
QuestionHow to change utc Date in a normal Date Pin
Member 1191673528-Jan-16 2:20
Member 1191673528-Jan-16 2:20 
AnswerRe: How to change utc Date in a normal Date Pin
Sascha Lefèvre28-Jan-16 3:06
professionalSascha Lefèvre28-Jan-16 3:06 
GeneralRe: How to change utc Date in a normal Date Pin
jschell29-Jan-16 12:26
jschell29-Jan-16 12:26 
AnswerRe: How to change utc Date in a normal Date Pin
Eddy Vluggen28-Jan-16 3:19
professionalEddy Vluggen28-Jan-16 3:19 

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.