Click here to Skip to main content
15,885,537 members
Home / Discussions / C#
   

C#

 
AnswerRe: Retrieve a date from the result of a query in a variable c # Pin
Sascha Lefèvre31-Jan-16 23:25
professionalSascha Lefèvre31-Jan-16 23:25 
GeneralRe: Retrieve a date from the result of a query in a variable c # Pin
Ibrahim.elh1-Feb-16 3:05
Ibrahim.elh1-Feb-16 3:05 
GeneralRe: Retrieve a date from the result of a query in a variable c # Pin
Sascha Lefèvre1-Feb-16 3:16
professionalSascha Lefèvre1-Feb-16 3:16 
QuestionReactive Extensions and WeakEvents Pin
Kenneth Haugland30-Jan-16 3:23
mvaKenneth Haugland30-Jan-16 3:23 
AnswerRe: Reactive Extensions and WeakEvents Pin
Sascha Lefèvre30-Jan-16 4:20
professionalSascha Lefèvre30-Jan-16 4:20 
GeneralRe: Reactive Extensions and WeakEvents Pin
Kenneth Haugland30-Jan-16 5:27
mvaKenneth Haugland30-Jan-16 5:27 
GeneralRe: Reactive Extensions and WeakEvents Pin
Sascha Lefèvre30-Jan-16 6:20
professionalSascha Lefèvre30-Jan-16 6:20 
GeneralRe: Reactive Extensions and WeakEvents Pin
Kenneth Haugland30-Jan-16 7:29
mvaKenneth Haugland30-Jan-16 7:29 
Yes, I understood that, and the target is actually the Weakreferance. My question is more of what happens inside the Rx compiler when you subscribe to the event:
C#
public static IObservable<EventPattern<NotifyCollectionChangedEventArgs>> ObserveCollectionChanged(this INotifyCollectionChanged collection)
{
    return Observable.FromEventPattern<NotifyCollectionChangedEventHandler, NotifyCollectionChangedEventArgs>(
            handler => (sender, e) => handler(sender, e),
            handler => collection.CollectionChanged += handler,
            handler => collection.CollectionChanged -= handler);
}

I get that these event get converted into a stream by use of Subject class. Since the event is subscribed before the weak reference is implemented, in fact it comes directly from the method above. What you are telling me (hopefully I'll get this right Big Grin | :-D ) is that a non-static void, will generate a strong reference, and the static (shared) void creates a weak reference. So the event subscription in the code above is not important?
GeneralRe: Reactive Extensions and WeakEvents Pin
Sascha Lefèvre30-Jan-16 8:06
professionalSascha Lefèvre30-Jan-16 8:06 
AnswerRe: Reactive Extensions and WeakEvents Pin
Sascha Lefèvre30-Jan-16 11:42
professionalSascha Lefèvre30-Jan-16 11:42 
GeneralRe: Reactive Extensions and WeakEvents Pin
Kenneth Haugland31-Jan-16 1:19
mvaKenneth Haugland31-Jan-16 1:19 
GeneralRe: Reactive Extensions and WeakEvents Pin
Sascha Lefèvre31-Jan-16 1:42
professionalSascha Lefèvre31-Jan-16 1:42 
GeneralRe: Reactive Extensions and WeakEvents Pin
Kenneth Haugland31-Jan-16 4:24
mvaKenneth Haugland31-Jan-16 4:24 
GeneralRe: Reactive Extensions and WeakEvents Pin
Sascha Lefèvre31-Jan-16 6:34
professionalSascha Lefèvre31-Jan-16 6:34 
GeneralRe: Reactive Extensions and WeakEvents Pin
Kenneth Haugland31-Jan-16 7:29
mvaKenneth Haugland31-Jan-16 7:29 
GeneralRe: Reactive Extensions and WeakEvents Pin
Kenneth Haugland31-Jan-16 11:27
mvaKenneth Haugland31-Jan-16 11:27 
QuestionTableLayoutPanel and .. surprise surprise .. weird behaviour 8) Pin
Emanuele Bonin30-Jan-16 1:24
Emanuele Bonin30-Jan-16 1:24 
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 

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.