IEnumerable Queue.Count is not returning an integer [closed]












-4















I am attempting to define a queue named movingAverages with a size of queue.Count - period. I am getting an error "int IEnumerable.Count() ... - cannot be applied to method and int....



private static IEnumerable<DateClose> MovingAverage(
IEnumerable<DateClose> queue, int period)
{
Queue<DateClose> movingAverages = new Queue<DateClose>(queue.Count + period);
return movingAverages;

}









share|improve this question













closed as off-topic by Progman, Christian Gollhardt, Erik Philips, BJ Myers, Graham Nov 16 '18 at 0:40


This question appears to be off-topic. The users who voted to close gave these specific reasons:



  • "This question was caused by a problem that can no longer be reproduced or a simple typographical error. While similar questions may be on-topic here, this one was resolved in a manner unlikely to help future readers. This can often be avoided by identifying and closely inspecting the shortest program necessary to reproduce the problem before posting." – Erik Philips, BJ Myers, Graham

  • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example." – Progman, Christian Gollhardt


If this question can be reworded to fit the rules in the help center, please edit the question.














  • Please edit your question to include the full source code and the full error message.

    – Progman
    Nov 15 '18 at 22:17











  • .Count() is a method, not a property. You need the parenthesis. Otherwise you're attempting to add the method to an integer.

    – Glorin Oakenfoot
    Nov 15 '18 at 22:26


















-4















I am attempting to define a queue named movingAverages with a size of queue.Count - period. I am getting an error "int IEnumerable.Count() ... - cannot be applied to method and int....



private static IEnumerable<DateClose> MovingAverage(
IEnumerable<DateClose> queue, int period)
{
Queue<DateClose> movingAverages = new Queue<DateClose>(queue.Count + period);
return movingAverages;

}









share|improve this question













closed as off-topic by Progman, Christian Gollhardt, Erik Philips, BJ Myers, Graham Nov 16 '18 at 0:40


This question appears to be off-topic. The users who voted to close gave these specific reasons:



  • "This question was caused by a problem that can no longer be reproduced or a simple typographical error. While similar questions may be on-topic here, this one was resolved in a manner unlikely to help future readers. This can often be avoided by identifying and closely inspecting the shortest program necessary to reproduce the problem before posting." – Erik Philips, BJ Myers, Graham

  • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example." – Progman, Christian Gollhardt


If this question can be reworded to fit the rules in the help center, please edit the question.














  • Please edit your question to include the full source code and the full error message.

    – Progman
    Nov 15 '18 at 22:17











  • .Count() is a method, not a property. You need the parenthesis. Otherwise you're attempting to add the method to an integer.

    – Glorin Oakenfoot
    Nov 15 '18 at 22:26
















-4












-4








-4








I am attempting to define a queue named movingAverages with a size of queue.Count - period. I am getting an error "int IEnumerable.Count() ... - cannot be applied to method and int....



private static IEnumerable<DateClose> MovingAverage(
IEnumerable<DateClose> queue, int period)
{
Queue<DateClose> movingAverages = new Queue<DateClose>(queue.Count + period);
return movingAverages;

}









share|improve this question














I am attempting to define a queue named movingAverages with a size of queue.Count - period. I am getting an error "int IEnumerable.Count() ... - cannot be applied to method and int....



private static IEnumerable<DateClose> MovingAverage(
IEnumerable<DateClose> queue, int period)
{
Queue<DateClose> movingAverages = new Queue<DateClose>(queue.Count + period);
return movingAverages;

}






c#






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 15 '18 at 22:15









Jam66125Jam66125

596




596




closed as off-topic by Progman, Christian Gollhardt, Erik Philips, BJ Myers, Graham Nov 16 '18 at 0:40


This question appears to be off-topic. The users who voted to close gave these specific reasons:



  • "This question was caused by a problem that can no longer be reproduced or a simple typographical error. While similar questions may be on-topic here, this one was resolved in a manner unlikely to help future readers. This can often be avoided by identifying and closely inspecting the shortest program necessary to reproduce the problem before posting." – Erik Philips, BJ Myers, Graham

  • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example." – Progman, Christian Gollhardt


If this question can be reworded to fit the rules in the help center, please edit the question.




closed as off-topic by Progman, Christian Gollhardt, Erik Philips, BJ Myers, Graham Nov 16 '18 at 0:40


This question appears to be off-topic. The users who voted to close gave these specific reasons:



  • "This question was caused by a problem that can no longer be reproduced or a simple typographical error. While similar questions may be on-topic here, this one was resolved in a manner unlikely to help future readers. This can often be avoided by identifying and closely inspecting the shortest program necessary to reproduce the problem before posting." – Erik Philips, BJ Myers, Graham

  • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example." – Progman, Christian Gollhardt


If this question can be reworded to fit the rules in the help center, please edit the question.













  • Please edit your question to include the full source code and the full error message.

    – Progman
    Nov 15 '18 at 22:17











  • .Count() is a method, not a property. You need the parenthesis. Otherwise you're attempting to add the method to an integer.

    – Glorin Oakenfoot
    Nov 15 '18 at 22:26





















  • Please edit your question to include the full source code and the full error message.

    – Progman
    Nov 15 '18 at 22:17











  • .Count() is a method, not a property. You need the parenthesis. Otherwise you're attempting to add the method to an integer.

    – Glorin Oakenfoot
    Nov 15 '18 at 22:26



















Please edit your question to include the full source code and the full error message.

– Progman
Nov 15 '18 at 22:17





Please edit your question to include the full source code and the full error message.

– Progman
Nov 15 '18 at 22:17













.Count() is a method, not a property. You need the parenthesis. Otherwise you're attempting to add the method to an integer.

– Glorin Oakenfoot
Nov 15 '18 at 22:26







.Count() is a method, not a property. You need the parenthesis. Otherwise you're attempting to add the method to an integer.

– Glorin Oakenfoot
Nov 15 '18 at 22:26














1 Answer
1






active

oldest

votes


















3














Well it's because IEnumerable<T>.Count is a method, so you are missing the parentheses at queue.Count + period, which should be queue.Count() + period.






share|improve this answer






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3














    Well it's because IEnumerable<T>.Count is a method, so you are missing the parentheses at queue.Count + period, which should be queue.Count() + period.






    share|improve this answer




























      3














      Well it's because IEnumerable<T>.Count is a method, so you are missing the parentheses at queue.Count + period, which should be queue.Count() + period.






      share|improve this answer


























        3












        3








        3







        Well it's because IEnumerable<T>.Count is a method, so you are missing the parentheses at queue.Count + period, which should be queue.Count() + period.






        share|improve this answer













        Well it's because IEnumerable<T>.Count is a method, so you are missing the parentheses at queue.Count + period, which should be queue.Count() + period.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 15 '18 at 22:28









        MadKarelMadKarel

        812




        812















            Popular posts from this blog

            鏡平學校

            ꓛꓣだゔៀៅຸ໢ທຮ໕໒ ,ໂ'໥໓າ໼ឨឲ៵៭ៈゎゔit''䖳𥁄卿' ☨₤₨こゎもょの;ꜹꟚꞖꞵꟅꞛေၦေɯ,ɨɡ𛃵𛁹ޝ޳ޠ޾,ޤޒޯ޾𫝒𫠁သ𛅤チョ'サノބޘދ𛁐ᶿᶇᶀᶋᶠ㨑㽹⻮ꧬ꧹؍۩وَؠ㇕㇃㇪ ㇦㇋㇋ṜẰᵡᴠ 軌ᵕ搜۳ٰޗޮ޷ސޯ𫖾𫅀ल, ꙭ꙰ꚅꙁꚊꞻꝔ꟠Ꝭㄤﺟޱސꧨꧼ꧴ꧯꧽ꧲ꧯ'⽹⽭⾁⿞⼳⽋២៩ញណើꩯꩤ꩸ꩮᶻᶺᶧᶂ𫳲𫪭𬸄𫵰𬖩𬫣𬊉ၲ𛅬㕦䬺𫝌𫝼,,𫟖𫞽ហៅ஫㆔ాఆఅꙒꚞꙍ,Ꙟ꙱エ ,ポテ,フࢰࢯ𫟠𫞶 𫝤𫟠ﺕﹱﻜﻣ𪵕𪭸𪻆𪾩𫔷ġ,ŧآꞪ꟥,ꞔꝻ♚☹⛵𛀌ꬷꭞȄƁƪƬșƦǙǗdžƝǯǧⱦⱰꓕꓢႋ神 ဴ၀க௭எ௫ឫោ ' េㇷㇴㇼ神ㇸㇲㇽㇴㇼㇻㇸ'ㇸㇿㇸㇹㇰㆣꓚꓤ₡₧ ㄨㄟ㄂ㄖㄎ໗ツڒذ₶।ऩछएोञयूटक़कयँृी,冬'𛅢𛅥ㇱㇵㇶ𥄥𦒽𠣧𠊓𧢖𥞘𩔋цѰㄠſtʯʭɿʆʗʍʩɷɛ,əʏダヵㄐㄘR{gỚṖḺờṠṫảḙḭᴮᵏᴘᵀᵷᵕᴜᴏᵾq﮲ﲿﴽﭙ軌ﰬﶚﶧ﫲Ҝжюїкӈㇴffצּ﬘﭅﬈軌'ffistfflſtffतभफɳɰʊɲʎ𛁱𛁖𛁮𛀉 𛂯𛀞నఋŀŲ 𫟲𫠖𫞺ຆຆ ໹້໕໗ๆทԊꧢꧠ꧰ꓱ⿝⼑ŎḬẃẖỐẅ ,ờỰỈỗﮊDžȩꭏꭎꬻ꭮ꬿꭖꭥꭅ㇭神 ⾈ꓵꓑ⺄㄄ㄪㄙㄅㄇstA۵䞽ॶ𫞑𫝄㇉㇇゜軌𩜛𩳠Jﻺ‚Üမ႕ႌႊၐၸဓၞၞၡ៸wyvtᶎᶪᶹစဎ꣡꣰꣢꣤ٗ؋لㇳㇾㇻㇱ㆐㆔,,㆟Ⱶヤマފ޼ޝަݿݞݠݷݐ',ݘ,ݪݙݵ𬝉𬜁𫝨𫞘くせぉて¼óû×ó£…𛅑הㄙくԗԀ5606神45,神796'𪤻𫞧ꓐ㄁ㄘɥɺꓵꓲ3''7034׉ⱦⱠˆ“𫝋ȍ,ꩲ軌꩷ꩶꩧꩫఞ۔فڱێظペサ神ナᴦᵑ47 9238їﻂ䐊䔉㠸﬎ffiﬣ,לּᴷᴦᵛᵽ,ᴨᵤ ᵸᵥᴗᵈꚏꚉꚟ⻆rtǟƴ𬎎

            Why https connections are so slow when debugging (stepping over) in Java?