Click here to Skip to main content
15,915,975 members
Home / Discussions / C#
   

C#

 
AnswerRe: c# data table filter Pin
Pete O'Hanlon22-May-17 23:45
mvePete O'Hanlon22-May-17 23:45 
GeneralRe: c# data table filter Pin
Chris Quinn23-May-17 0:24
Chris Quinn23-May-17 0:24 
GeneralRe: c# data table filter Pin
Pete O'Hanlon23-May-17 1:17
mvePete O'Hanlon23-May-17 1:17 
Questionhow to achieve cell_doubleclick event to be fired on gridview Pin
Mayank Kumar22-May-17 18:45
Mayank Kumar22-May-17 18:45 
AnswerRe: how to achieve cell_doubleclick event to be fired on gridview Pin
Richard MacCutchan22-May-17 21:19
mveRichard MacCutchan22-May-17 21:19 
GeneralRe: how to achieve cell_doubleclick event to be fired on gridview Pin
Mayank Kumar22-May-17 22:43
Mayank Kumar22-May-17 22:43 
GeneralRe: how to achieve cell_doubleclick event to be fired on gridview Pin
Richard MacCutchan22-May-17 22:58
mveRichard MacCutchan22-May-17 22:58 
GeneralRe: how to achieve cell_doubleclick event to be fired on gridview Pin
Mayank Kumar23-May-17 0:02
Mayank Kumar23-May-17 0:02 
GeneralRe: how to achieve cell_doubleclick event to be fired on gridview Pin
Richard MacCutchan23-May-17 0:08
mveRichard MacCutchan23-May-17 0:08 
GeneralRe: how to achieve cell_doubleclick event to be fired on gridview Pin
Mayank Kumar23-May-17 0:12
Mayank Kumar23-May-17 0:12 
GeneralRe: how to achieve cell_doubleclick event to be fired on gridview Pin
Pete O'Hanlon23-May-17 0:12
mvePete O'Hanlon23-May-17 0:12 
QuestionMerging 2 different JSON objects Pin
Farhad Eft21-May-17 21:41
Farhad Eft21-May-17 21:41 
AnswerRe: Merging 2 different JSON objects Pin
Richard MacCutchan21-May-17 22:49
mveRichard MacCutchan21-May-17 22:49 
GeneralRe: Merging 2 different JSON objects Pin
Farhad Eft24-May-17 0:41
Farhad Eft24-May-17 0:41 
Questionbest way to Lazy-Load a Dictionary' s 'Values ? Pin
BillWoodruff18-May-17 6:51
professionalBillWoodruff18-May-17 6:51 
AnswerRe: best way to Lazy-Load a Dictionary' s 'Values ? Pin
Afzaal Ahmad Zeeshan18-May-17 8:34
professionalAfzaal Ahmad Zeeshan18-May-17 8:34 
GeneralRe: best way to Lazy-Load a Dictionary' s 'Values ? Pin
BillWoodruff18-May-17 14:47
professionalBillWoodruff18-May-17 14:47 
Quote:
if I had to implement "lazy" loading like feature here, I would simply just set it to null
Hi, Afzaal,

I do not claim to be an expert on Lazy<T>: the question here comes out of my "quest" to better understand it. I would say that you use a Lazy<T> because instantiating one with 'new does not allocate memory for what it wraps. So you can eliminate guard-code like in the 'getter in this Property:
// C# 7: using expression-body member as 'setter or 'getter now allowed in properties that are not read-only
public List<PersonNode> AllNodes
{
    get => _allNodes ?? (_allNodes = new List<PersonNode>());
    private set => _allNodes = value;
}
Even though I have not used the thread-safety features of Lazy<T>, it's clear those features are extensive.

C# 7 ? : still trying to digest it Smile | :) Some well written articles by Jonathan Allen are helping: [^]

cheers, Bill
«When I consider my brief span of life, swallowed up in an eternity before and after, the little space I fill, and even can see, engulfed in the infinite immensity of spaces of which I am ignorant, and which know me not, I am frightened, and am astonished at being here rather than there; for there is no reason why here rather than there, now rather than then.» Blaise Pascal

GeneralRe: best way to Lazy-Load a Dictionary' s 'Values ? Pin
Afzaal Ahmad Zeeshan18-May-17 23:03
professionalAfzaal Ahmad Zeeshan18-May-17 23:03 
AnswerRe: best way to Lazy-Load a Dictionary' s 'Values ? Pin
Richard Deeming18-May-17 11:48
mveRichard Deeming18-May-17 11:48 
GeneralRe: best way to Lazy-Load a Dictionary' s 'Values ? Pin
BillWoodruff18-May-17 14:52
professionalBillWoodruff18-May-17 14:52 
GeneralRe: best way to Lazy-Load a Dictionary' s 'Values ? Pin
Richard Deeming23-May-17 1:02
mveRichard Deeming23-May-17 1:02 
Questionhow to implement dynamic range compression for audio? Pin
Member 1319657418-May-17 3:45
Member 1319657418-May-17 3:45 
AnswerRe: how to implement dynamic range compression for audio? Pin
Richard MacCutchan18-May-17 3:47
mveRichard MacCutchan18-May-17 3:47 
GeneralRe: how to implement dynamic range compression for audio? Pin
Member 1319657418-May-17 3:56
Member 1319657418-May-17 3:56 
GeneralRe: how to implement dynamic range compression for audio? Pin
Richard MacCutchan18-May-17 3:58
mveRichard MacCutchan18-May-17 3:58 

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.