-
Notifications
You must be signed in to change notification settings - Fork 0
Python
Jasper Zanjani edited this page Aug 15, 2020
·
4 revisions
Feature | base() |
super() |
---|---|---|
Constructor Both languages feature a keyword that allows a subclass to access its direct parent. Whereas in Python the terms superclass and subclass are used, in C# the terms base class and derived class seem to be preferred. | class BaseClass { private BaseClass { } } class DerivedClass : BaseClass { public DerivedClass() : base() { } } |
class BaseClass: def __init__(self): pass class DerivedClass: def __init__(self): super().__init__() |
In C# the term enumeration refers to the process of successively returning individual values. In Python, the term iteration is referred to the same thing, and iterable refers to an object that can be iterated, or parsed out into sub-elements. |
IEnumerable
The IEnumerable interface implements enumeration. |
Any object that exposes the __iter__() and __next__() dunder methods are iterable. |
List length | List<T>.Count |
len(List) |
JSON | The Newtonsoft.Json package must be installed, which includes the Newtonsoft.Json namespace. |
- Newtonsoft.Json
- System.Random
- System.Threading
- System.Threading.Tasks
- Windows.Foundation
- Windows.Storage
- Windows.UI.ViewManagement
- Windows.UI.Xaml.Markup
- Dependency properties
- Markup extensions
- Namespaces
- Resource dictionaries
- SplitView
- Page ?
- Type conversion
- Grid ?
- StackPanel ?
- RelativePanel ?
- VariableSizedWrapGrid
- Canvas