You searched for exceptions
. We found 168
results in 0.080 seconds.
If you look at the Consumer<T> interface, the accept method (which is what your method reference would effectively be using) isn't declared to throw any checked exceptions - therefore you can't use a method reference which is... more
It looks like your problem is in the checkurl method, which doesn't dispose of the WebResponse that it gets - that means the connection pool associated with that host has effectively "lost" that connection until the WebResponse gets... more
Guid.NewGuid is a method, and you're not calling that method from your VB code - you're calling the constructor accepting a string. You can call that same constructor in C#: // Using an array initializer for simplicity Guid[] test = { new... more
it skips over [...] Presumably that's because there's no data to read, so myReader.Read() just returns false. it doesnt write the values i told it to. You don't actually tell it to write anything. You create a SqlCommand to... more
Suppose you currently have: public interface Foo { void bar(); } You cannot later evolve this to: public interface Foo { void bar() throws SomeException; } (where SomeException is a checked exception) because code that... more
It sounds like you really want something like: spinner.IsBusy = true; try { Task t1 = Task.Run(() => dataX = loadX()); Task t2 = Task.Run(() => dataY = loadY()); Task t3 = Task.Run(() => dataZ = loadZ()); await... more
Yes, it is aware that it's an invalid local time - which is why when you specifically ask it to convert that local time into UTC, it throws an exception. It's roughly equivalent to calling Math.sqrt(-1). The InZoneStrictly call you're... more
I suspect you just want: public Action<T> Builder<T>() where T : DbContext Then you could call it as: Action<SpecificDbContext> actionHelper = Builder<SpecificDbContext>(); You don't need the type argument, as... more
Do I actually need try.. catch in every method? No. In fact, it's harming your diagnostics by cutting off the stack trace - you won't be able to see the original full stack trace. You could fix that by just using: throw; instead... more
You have a property, which, when you execute the "get" accessor, finds all the properties and fetches their value. So it executes itself, recursively. If you only want string properties, you should check the property type before fetching... more