C# |
C++ |
bool | bool |
byte | unsigned char |
sbyte | signed char |
char | wchar_t (assuming 16-bit) |
byte ,
ushort ,
uint ,
ulong
|
uint8_t ,
uint16_t ,
uint32_t ,
uint64_t
|
sbyte ,
short ,
int ,
long
|
int8_t ,
int16_t ,
int32_t ,
int64_t
|
float ,
double
|
float ,
double , on most implementations
|
System.UIntPtr ,
System.IntPtr
|
uintptr_t ,
intptr_t ,
|
void a> | void |
var a> | auto |
object a> | std::shared_ptr<std::any> , but GCed |
|
System.WeakReference<T> code> | std::weak_ptr<T> |
ReferenceType code> | std::shared_ptr<ReferenceType> , but GCed |
ValueType code> | ValueType |
ValueType? code> | std::option<ValueType> |
|
System.String | std::shared_ptr<const std::wstring> |
System.Text.StringBuilder | std::shared_ptr<std::wstring> |
|
S...Collections.Generic.List<V> a> | std::vector<V> |
S...Collections.Generic.Dictionary<K,V> a> | std::unordered_map<K,V> |
S...Collections.Generic.HashSet<V> a> | std::unordered_set<V> |
S...Collections.Generic.LinkedList<V> a> | std::list<V> |
S...Collections.Generic.Queue<V> a> | std::queue<V> |
S...Collections.Generic.Queue<V> a> | std::queue<V> |
S...Collections.Generic.SortedDictionary<K,V> a> | std::map<K,V> |
S...Collections.Generic.SortedSet<V> a> | std::set<V> |
S...Collections.Generic.Stack<V> a> | std::stack<V> |
S...Collections.Generic.KeyValuePair<K,V> a> | std::pair<K,V> |
System.Tuple<A,B,C> a> | std::tuple<A,B,C> |
|
System.Func<A,B,R> | std::function<R (A,B)> |
System.Action<A,B> | std::function<void (A,B)> |