簡體   English   中英

Python程序員編寫C#的建議

[英]Advice for Python programmer writing C#

我已經看到了有關為C#程序員編寫Python代碼提供建議的問題 ,但我的方向相反。

Python程序員編寫C#代碼有哪些技巧,竅門和警告?

這是我的問題所指的一些示例:

  • C#中的enumerate()

    另一種可能性:

     "abc".Where((x,i) => true).Select((x, i) => string.Format("{0}: {1}", i, x)) 0: a 1: b 2: c 
  • C#中的列表理解

     List<Foo> fooList = new List<Foo>(); IEnumerable<Foo> extract = from foo in fooList where foo.Bar > 10 select Foo.Name.ToUpper(); 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM