1 <?xml version="1.0" encoding="utf-8"?>
4 <name>System.Runtime.CompilerServices.Unsafe</name>
7 <member name="T:System.Runtime.CompilerServices.Unsafe">
8 <summary>Contains generic, low-level functionality for manipulating pointers.</summary>
10 <member name="M:System.Runtime.CompilerServices.Unsafe.Add``1(``0@,System.Int32)">
11 <summary>Adds an element offset to the given reference.</summary>
12 <param name="source">The reference to add the offset to.</param>
13 <param name="elementOffset">The offset to add.</param>
14 <typeparam name="T">The type of reference.</typeparam>
15 <returns>A new reference that reflects the addition of offset to pointer.</returns>
17 <member name="M:System.Runtime.CompilerServices.Unsafe.Add``1(``0@,System.IntPtr)">
18 <summary>Adds an element offset to the given reference.</summary>
19 <param name="source">The reference to add the offset to.</param>
20 <param name="elementOffset">The offset to add.</param>
21 <typeparam name="T">The type of reference.</typeparam>
22 <returns>A new reference that reflects the addition of offset to pointer.</returns>
24 <member name="M:System.Runtime.CompilerServices.Unsafe.Add``1(``0@,System.UIntPtr)">
25 <summary>Adds an element offset to the given reference.</summary>
26 <param name="source">The reference to add the offset to.</param>
27 <param name="elementOffset">The offset to add.</param>
28 <typeparam name="T">The type of reference.</typeparam>
29 <returns>A new reference that reflects the addition of offset to pointer.</returns>
31 <member name="M:System.Runtime.CompilerServices.Unsafe.Add``1(System.Void*,System.Int32)">
32 <summary>Adds an element offset to the given void pointer.</summary>
33 <param name="source">The void pointer to add the offset to.</param>
34 <param name="elementOffset">The offset to add.</param>
35 <typeparam name="T">The type of void pointer.</typeparam>
36 <returns>A new void pointer that reflects the addition of offset to the specified pointer.</returns>
38 <member name="M:System.Runtime.CompilerServices.Unsafe.AddByteOffset``1(``0@,System.IntPtr)">
39 <summary>Adds a byte offset to the given reference.</summary>
40 <param name="source">The reference to add the offset to.</param>
41 <param name="byteOffset">The offset to add.</param>
42 <typeparam name="T">The type of reference.</typeparam>
43 <returns>A new reference that reflects the addition of byte offset to pointer.</returns>
45 <member name="M:System.Runtime.CompilerServices.Unsafe.AddByteOffset``1(``0@,System.UIntPtr)">
46 <summary>Adds a byte offset to the given reference.</summary>
47 <param name="source">The reference to add the offset to.</param>
48 <param name="byteOffset">The offset to add.</param>
49 <typeparam name="T">The type of reference.</typeparam>
50 <returns>A new reference that reflects the addition of byte offset to pointer.</returns>
52 <member name="M:System.Runtime.CompilerServices.Unsafe.AreSame``1(``0@,``0@)">
53 <summary>Determines whether the specified references point to the same location.</summary>
54 <param name="left">The first reference to compare.</param>
55 <param name="right">The second reference to compare.</param>
56 <typeparam name="T">The type of reference.</typeparam>
58 <see langword="true" /> if <paramref name="left" /> and <paramref name="right" /> point to the same location; otherwise, <see langword="false" />.</returns>
60 <member name="M:System.Runtime.CompilerServices.Unsafe.As``1(System.Object)">
61 <summary>Casts the given object to the specified type.</summary>
62 <param name="o">The object to cast.</param>
63 <typeparam name="T">The type which the object will be cast to.</typeparam>
64 <returns>The original object, casted to the given type.</returns>
66 <member name="M:System.Runtime.CompilerServices.Unsafe.As``2(``0@)">
67 <summary>Reinterprets the given reference as a reference to a value of type <typeparamref name="TTo" />.</summary>
68 <param name="source">The reference to reinterpret.</param>
69 <typeparam name="TFrom">The type of reference to reinterpret.</typeparam>
70 <typeparam name="TTo">The desired type of the reference.</typeparam>
71 <returns>A reference to a value of type <typeparamref name="TTo" />.</returns>
73 <member name="M:System.Runtime.CompilerServices.Unsafe.AsPointer``1(``0@)">
74 <summary>Returns a pointer to the given by-ref parameter.</summary>
75 <param name="value">The object whose pointer is obtained.</param>
76 <typeparam name="T">The type of object.</typeparam>
77 <returns>A pointer to the given value.</returns>
79 <member name="M:System.Runtime.CompilerServices.Unsafe.AsRef``1(``0@)">
80 <summary>Reinterprets the given read-only reference as a reference.</summary>
81 <param name="source">The read-only reference to reinterpret.</param>
82 <typeparam name="T">The type of reference.</typeparam>
83 <returns>A reference to a value of type <typeparamref name="T" />.</returns>
85 <member name="M:System.Runtime.CompilerServices.Unsafe.AsRef``1(System.Void*)">
86 <summary>Reinterprets the given location as a reference to a value of type <typeparamref name="T" />.</summary>
87 <param name="source">The location of the value to reference.</param>
88 <typeparam name="T">The type of the interpreted location.</typeparam>
89 <returns>A reference to a value of type <typeparamref name="T" />.</returns>
91 <member name="M:System.Runtime.CompilerServices.Unsafe.ByteOffset``1(``0@,``0@)">
92 <summary>Determines the byte offset from origin to target from the given references.</summary>
93 <param name="origin">The reference to origin.</param>
94 <param name="target">The reference to target.</param>
95 <typeparam name="T">The type of reference.</typeparam>
96 <returns>Byte offset from origin to target i.e. <paramref name="target" /> - <paramref name="origin" />.</returns>
98 <member name="M:System.Runtime.CompilerServices.Unsafe.Copy``1(``0@,System.Void*)">
99 <summary>Copies a value of type <typeparamref name="T" /> to the given location.</summary>
100 <param name="destination">The location to copy to.</param>
101 <param name="source">A pointer to the value to copy.</param>
102 <typeparam name="T">The type of value to copy.</typeparam>
104 <member name="M:System.Runtime.CompilerServices.Unsafe.Copy``1(System.Void*,``0@)">
105 <summary>Copies a value of type <typeparamref name="T" /> to the given location.</summary>
106 <param name="destination">The location to copy to.</param>
107 <param name="source">A reference to the value to copy.</param>
108 <typeparam name="T">The type of value to copy.</typeparam>
110 <member name="M:System.Runtime.CompilerServices.Unsafe.CopyBlock(System.Byte@,System.Byte@,System.UInt32)">
111 <summary>Copies bytes from the source address to the destination address.</summary>
112 <param name="destination">The destination address to copy to.</param>
113 <param name="source">The source address to copy from.</param>
114 <param name="byteCount">The number of bytes to copy.</param>
116 <member name="M:System.Runtime.CompilerServices.Unsafe.CopyBlock(System.Void*,System.Void*,System.UInt32)">
117 <summary>Copies bytes from the source address to the destination address.</summary>
118 <param name="destination">The destination address to copy to.</param>
119 <param name="source">The source address to copy from.</param>
120 <param name="byteCount">The number of bytes to copy.</param>
122 <member name="M:System.Runtime.CompilerServices.Unsafe.CopyBlockUnaligned(System.Byte@,System.Byte@,System.UInt32)">
123 <summary>Copies bytes from the source address to the destination address without assuming architecture dependent alignment of the addresses.</summary>
124 <param name="destination">The destination address to copy to.</param>
125 <param name="source">The source address to copy from.</param>
126 <param name="byteCount">The number of bytes to copy.</param>
128 <member name="M:System.Runtime.CompilerServices.Unsafe.CopyBlockUnaligned(System.Void*,System.Void*,System.UInt32)">
129 <summary>Copies bytes from the source address to the destination address without assuming architecture dependent alignment of the addresses.</summary>
130 <param name="destination">The destination address to copy to.</param>
131 <param name="source">The source address to copy from.</param>
132 <param name="byteCount">The number of bytes to copy.</param>
134 <member name="M:System.Runtime.CompilerServices.Unsafe.InitBlock(System.Byte@,System.Byte,System.UInt32)">
135 <summary>Initializes a block of memory at the given location with a given initial value.</summary>
136 <param name="startAddress">The address of the start of the memory block to initialize.</param>
137 <param name="value">The value to initialize the block to.</param>
138 <param name="byteCount">The number of bytes to initialize.</param>
140 <member name="M:System.Runtime.CompilerServices.Unsafe.InitBlock(System.Void*,System.Byte,System.UInt32)">
141 <summary>Initializes a block of memory at the given location with a given initial value.</summary>
142 <param name="startAddress">The address of the start of the memory block to initialize.</param>
143 <param name="value">The value to initialize the block to.</param>
144 <param name="byteCount">The number of bytes to initialize.</param>
146 <member name="M:System.Runtime.CompilerServices.Unsafe.InitBlockUnaligned(System.Byte@,System.Byte,System.UInt32)">
147 <summary>Initializes a block of memory at the given location with a given initial value without assuming architecture dependent alignment of the address.</summary>
148 <param name="startAddress">The address of the start of the memory block to initialize.</param>
149 <param name="value">The value to initialize the block to.</param>
150 <param name="byteCount">The number of bytes to initialize.</param>
152 <member name="M:System.Runtime.CompilerServices.Unsafe.InitBlockUnaligned(System.Void*,System.Byte,System.UInt32)">
153 <summary>Initializes a block of memory at the given location with a given initial value without assuming architecture dependent alignment of the address.</summary>
154 <param name="startAddress">The address of the start of the memory block to initialize.</param>
155 <param name="value">The value to initialize the block to.</param>
156 <param name="byteCount">The number of bytes to initialize.</param>
158 <member name="M:System.Runtime.CompilerServices.Unsafe.IsAddressGreaterThan``1(``0@,``0@)">
159 <summary>Returns a value that indicates whether a specified reference is greater than another specified reference.</summary>
160 <param name="left">The first value to compare.</param>
161 <param name="right">The second value to compare.</param>
162 <typeparam name="T">The type of the reference.</typeparam>
164 <see langword="true" /> if <paramref name="left" /> is greater than <paramref name="right" />; otherwise, <see langword="false" />.</returns>
166 <member name="M:System.Runtime.CompilerServices.Unsafe.IsAddressLessThan``1(``0@,``0@)">
167 <summary>Returns a value that indicates whether a specified reference is less than another specified reference.</summary>
168 <param name="left">The first value to compare.</param>
169 <param name="right">The second value to compare.</param>
170 <typeparam name="T">The type of the reference.</typeparam>
172 <see langword="true" /> if <paramref name="left" /> is less than <paramref name="right" />; otherwise, <see langword="false" />.</returns>
174 <member name="M:System.Runtime.CompilerServices.Unsafe.IsNullRef``1(``0@)">
175 <summary>Determines if a given reference to a value of type <typeparamref name="T" /> is a null reference.</summary>
176 <param name="source">The reference to check.</param>
177 <typeparam name="T">The type of the reference.</typeparam>
179 <see langword="true" /> if <paramref name="source" /> is a null reference; otherwise, <see langword="false" />.</returns>
181 <member name="M:System.Runtime.CompilerServices.Unsafe.NullRef``1">
182 <summary>Returns a reference to a value of type <typeparamref name="T" /> that is a null reference.</summary>
183 <typeparam name="T">The type of the reference.</typeparam>
184 <returns>A reference to a value of type <typeparamref name="T" /> that is a null reference.</returns>
186 <member name="M:System.Runtime.CompilerServices.Unsafe.Read``1(System.Void*)">
187 <summary>Reads a value of type <typeparamref name="T" /> from the given location.</summary>
188 <param name="source">The location to read from.</param>
189 <typeparam name="T">The type to read.</typeparam>
190 <returns>An object of type <typeparamref name="T" /> read from the given location.</returns>
192 <member name="M:System.Runtime.CompilerServices.Unsafe.ReadUnaligned``1(System.Byte@)">
193 <summary>Reads a value of type <typeparamref name="T" /> from the given location without assuming architecture dependent alignment of the addresses.</summary>
194 <param name="source">The location to read from.</param>
195 <typeparam name="T">The type to read.</typeparam>
196 <returns>An object of type <typeparamref name="T" /> read from the given location.</returns>
198 <member name="M:System.Runtime.CompilerServices.Unsafe.ReadUnaligned``1(System.Void*)">
199 <summary>Reads a value of type <typeparamref name="T" /> from the given location without assuming architecture dependent alignment of the addresses.</summary>
200 <param name="source">The location to read from.</param>
201 <typeparam name="T">The type to read.</typeparam>
202 <returns>An object of type <typeparamref name="T" /> read from the given location.</returns>
204 <member name="M:System.Runtime.CompilerServices.Unsafe.SizeOf``1">
205 <summary>Returns the size of an object of the given type parameter.</summary>
206 <typeparam name="T">The type of object whose size is retrieved.</typeparam>
207 <returns>The size of an object of type <typeparamref name="T" />.</returns>
209 <member name="M:System.Runtime.CompilerServices.Unsafe.SkipInit``1(``0@)">
210 <summary>Bypasses definite assignment rules for a given value.</summary>
211 <param name="value">The uninitialized object.</param>
212 <typeparam name="T">The type of the uninitialized object.</typeparam>
214 <member name="M:System.Runtime.CompilerServices.Unsafe.Subtract``1(``0@,System.Int32)">
215 <summary>Subtracts an element offset from the given reference.</summary>
216 <param name="source">The reference to subtract the offset from.</param>
217 <param name="elementOffset">The offset to subtract.</param>
218 <typeparam name="T">The type of reference.</typeparam>
219 <returns>A new reference that reflects the subtraction of offset from pointer.</returns>
221 <member name="M:System.Runtime.CompilerServices.Unsafe.Subtract``1(``0@,System.IntPtr)">
222 <summary>Subtracts an element offset from the given reference.</summary>
223 <param name="source">The reference to subtract the offset from.</param>
224 <param name="elementOffset">The offset to subtract.</param>
225 <typeparam name="T">The type of reference.</typeparam>
226 <returns>A new reference that reflects the subtraction of offset from pointer.</returns>
228 <member name="M:System.Runtime.CompilerServices.Unsafe.Subtract``1(``0@,System.UIntPtr)">
229 <summary>Subtracts an element offset from the given reference.</summary>
230 <param name="source">The reference to subtract the offset from.</param>
231 <param name="elementOffset">The offset to subtract.</param>
232 <typeparam name="T">The type of reference.</typeparam>
233 <returns>A new reference that reflects the subraction of offset from pointer.</returns>
235 <member name="M:System.Runtime.CompilerServices.Unsafe.Subtract``1(System.Void*,System.Int32)">
236 <summary>Subtracts an element offset from the given void pointer.</summary>
237 <param name="source">The void pointer to subtract the offset from.</param>
238 <param name="elementOffset">The offset to subtract.</param>
239 <typeparam name="T">The type of the void pointer.</typeparam>
240 <returns>A new void pointer that reflects the subtraction of offset from the specified pointer.</returns>
242 <member name="M:System.Runtime.CompilerServices.Unsafe.SubtractByteOffset``1(``0@,System.IntPtr)">
243 <summary>Subtracts a byte offset from the given reference.</summary>
244 <param name="source">The reference to subtract the offset from.</param>
245 <param name="byteOffset">The offset to subtract.</param>
246 <typeparam name="T">The type of reference.</typeparam>
247 <returns>A new reference that reflects the subtraction of byte offset from pointer.</returns>
249 <member name="M:System.Runtime.CompilerServices.Unsafe.SubtractByteOffset``1(``0@,System.UIntPtr)">
250 <summary>Subtracts a byte offset from the given reference.</summary>
251 <param name="source">The reference to subtract the offset from.</param>
252 <param name="byteOffset">The offset to subtract.</param>
253 <typeparam name="T">The type of reference.</typeparam>
254 <returns>A new reference that reflects the subraction of byte offset from pointer.</returns>
256 <member name="M:System.Runtime.CompilerServices.Unsafe.Unbox``1(System.Object)">
257 <summary>Returns a <see langword="mutable ref" /> to a boxed value.</summary>
258 <param name="box">The value to unbox.</param>
259 <typeparam name="T">The type to be unboxed.</typeparam>
260 <exception cref="T:System.NullReferenceException">
261 <paramref name="box" /> is <see langword="null" />, and <typeparamref name="T" /> is a non-nullable value type.</exception>
262 <exception cref="T:System.InvalidCastException">
263 <paramref name="box" /> is not a boxed value type.
267 <paramref name="box" /> is not a boxed <typeparamref name="T" />.</exception>
268 <exception cref="T:System.TypeLoadException">
269 <typeparamref name="T" /> cannot be found.</exception>
270 <returns>A <see langword="mutable ref" /> to the boxed value <paramref name="box" />.</returns>
272 <member name="M:System.Runtime.CompilerServices.Unsafe.Write``1(System.Void*,``0)">
273 <summary>Writes a value of type <typeparamref name="T" /> to the given location.</summary>
274 <param name="destination">The location to write to.</param>
275 <param name="value">The value to write.</param>
276 <typeparam name="T">The type of value to write.</typeparam>
278 <member name="M:System.Runtime.CompilerServices.Unsafe.WriteUnaligned``1(System.Byte@,``0)">
279 <summary>Writes a value of type <typeparamref name="T" /> to the given location without assuming architecture dependent alignment of the addresses.</summary>
280 <param name="destination">The location to write to.</param>
281 <param name="value">The value to write.</param>
282 <typeparam name="T">The type of value to write.</typeparam>
284 <member name="M:System.Runtime.CompilerServices.Unsafe.WriteUnaligned``1(System.Void*,``0)">
285 <summary>Writes a value of type <typeparamref name="T" /> to the given location without assuming architecture dependent alignment of the addresses.</summary>
286 <param name="destination">The location to write to.</param>
287 <param name="value">The value to write.</param>
288 <typeparam name="T">The type of value to write.</typeparam>