Results for nullable-reference-types
So im creating web api with asp net and using swagger ui and when i try to post data like Register user i get Following error: response status 400 { ...
Given the following dart 3 snippet, is it possible to match against A being nullable in the switch clause, and to find out which kind of nullable A is...
I'm encountering a typecasting error while using EF.CompileAsyncQuery to define a function that should return a nullable type (Memo?). The code snippe...
I have been using the is operator liberally in projects with nullable reference types: // Works just fine public CheckClass Foo(CheckClass? arg) ...
While I was trying to understand another issue, I ended up with the following code: class WorkoutHistory( history: MapInt> = EnumMap(Workout::clas...
I'm trying to define a function that returns a nullable version of the value passed in, and then apply it with a boolean. using System; #nullable ena...
Given a data class with a nullable field, why can't I construct it by only passing the non-nullable fields ? I have already seen this related question...
I have a class with the following setup: public class Cell { readonly private string? _rawString; public Cell(string inpString) { ...
How can I check whether the return type of a method is nullable or not? The project setting enable is active. Some examples (All methods are of type T...
I declared a Razor page with an optional parameter: [Parameter] public KeyValuePairstring, T>? Value { get; set; } Which I use in the Razor page marku...
I am receiving this error on a report page on my asp.net app. I have looked at the other answers to questions asked about this error, but am still una...
I first tried to read a file with a record which contains a column with the value "120,000.00". I want to convert this column to a nullable decimal. A...
I have the following code: import SwiftUI import SwiftData struct ContentView: View { @Environment(\.modelContext) private var modelContext ...
I try to get data from another activity via Register activity result using a nullable class, but Kotlin sees it as a nonnullable class and doesn't all...
how can i disable serialization of null objects? In my startup.cs i have: services.AddControllers() .AddJsonOptions(options => { ...
We have been using OpenAPI 3.0.x specification, which adds feature for declaring nullable properties. When I import this OpenAPI into AWS API Gateway,...
I have the code if (WORDLIST[language]==null) throw new Exception("Invalid Language"); List wordlist = WORDLIST[language]; the compiler says Error: A...
I have linq and its giving me that error. Let me show to you my linq first : public List GetHallForFair(Guid ID,int index) { return TradeTurkDBCon...
I have a simple class like this. public class Greeting { public string From { get; set; } public string To { get; set; } public string Me...
Let's say I had some function that takes a generic type as an argument. How do I check within that function whether the generic type argument is nulla...
How can I differentiate if an object is of type DateTime or NullableDateTime> (DateTime?)? I understand why the following code does not work, but can ...
When working with C# 8 and the new non-nullable references, I realized that events are treated like fields. This means that they will cause a warning ...
I have added a new field in my model but after that I have deleted db.sqlite3 (to ensure I don't get error below) agrawalo@:~/myapp> ls README.md co...
One of my unit tests has this signature: public void FooWithFilter(string fooId, decimal? amount) When I test it with null, it works: [InlineData("...
What is the simplest and best readable way to increment nullable Int in Kotlin? Is there any other way than doing this? var myInt: Int? = 3 myInt = i...
How do I undo the most recent local commits in Git?
How can I remove a specific item from an array in JavaScript?
How do I delete a Git branch locally and remotely?
How can I find all files containing a specific text (string) on Linux?
How to find all files containing specific text (string) on Linux?
How do I revert a Git repository to a previous commit?
How do I create an HTML button that acts like a link?
How do I check out a remote Git branch?