return Activator.CreateInstanceFrom(assemblyFile, typeName, activationAttributes);
}
- public object CreateInstanceFromAndUnwrap(string assemblyFile, string typeName)
+ public object? CreateInstanceFromAndUnwrap(string assemblyFile, string typeName)
{
ObjectHandle? oh = CreateInstanceFrom(assemblyFile, typeName);
- return oh?.Unwrap()!;
+ return oh?.Unwrap();
}
public object? CreateInstanceFromAndUnwrap(string assemblyFile, string typeName, bool ignoreCase, BindingFlags bindingAttr, Binder? binder, object?[]? args, System.Globalization.CultureInfo? culture, object?[]? activationAttributes)
args,
culture,
activationAttributes);
- return oh?.Unwrap()!;
+ return oh?.Unwrap();
}
public object? CreateInstanceFromAndUnwrap(string assemblyFile, string typeName, object?[]? activationAttributes)
{
ObjectHandle? oh = CreateInstanceFrom(assemblyFile, typeName, activationAttributes);
- return oh?.Unwrap()!;
+ return oh?.Unwrap();
}
public IPrincipal? GetThreadPrincipal()
private readonly struct SorterObjectArray
{
private readonly object[] keys;
- private readonly object[]? items;
+ private readonly object?[]? items;
private readonly IComparer comparer;
- internal SorterObjectArray(object[] keys, object[]? items, IComparer comparer)
+ internal SorterObjectArray(object[] keys, object?[]? items, IComparer comparer)
{
this.keys = keys;
this.items = items;
private void DownHeap(int i, int n, int lo)
{
object d = keys[lo + i - 1];
- object dt = (items != null) ? items[lo + i - 1] : null!;
+ object? dt = (items != null) ? items[lo + i - 1] : null;
int child;
while (i <= n / 2)
{
private void InsertionSort(int lo, int hi)
{
int i, j;
- object t, ti;
+ object t;
+ object? ti;
for (i = lo; i < hi; i++)
{
j = i;
t = keys[i + 1];
- ti = (items != null) ? items[i + 1] : null!;
+ ti = (items != null) ? items[i + 1] : null;
while (j >= lo && comparer.Compare(t, keys[j]) < 0)
{
keys[j + 1] = keys[j];
public static TimeZoneInfo CreateCustomTimeZone(\r
string id,\r
TimeSpan baseUtcOffset,\r
- string displayName,\r
- string standardDisplayName,\r
- string daylightDisplayName,\r
- AdjustmentRule[] adjustmentRules)\r
+ string? displayName,\r
+ string? standardDisplayName,\r
+ string? daylightDisplayName,\r
+ AdjustmentRule[]? adjustmentRules)\r
{\r
return CreateCustomTimeZone(\r
id,\r