Livid
Livid
CC#
Created by Livid on 10/30/2023 in #help
✅ HttpClient to Json
hey i tried a number of ways to get json from response.Content.ReadAsStringAsync()
16 replies
CC#
Created by Livid on 10/16/2023 in #help
✅ try catch
hey for example (i know tryparse exists)
var str1 = "123"
var str2 = "0ab"
var str3 = "65_"

var int1 = Convert.ToInt32(str1)
var int2 = Convert.ToInt32(str2)
var int3 = Convert.ToInt32(str3)
var str1 = "123"
var str2 = "0ab"
var str3 = "65_"

var int1 = Convert.ToInt32(str1)
var int2 = Convert.ToInt32(str2)
var int3 = Convert.ToInt32(str3)
is there a way to seperate the try / catch in a way that if int1 is valid (but int2 and int3 not) that int1 is still set
8 replies
CC#
Created by Livid on 10/9/2023 in #help
❔ dictionary as datasource
if i do ...DataSource = dic.Values it works but it don't keep it updated when i add/remove value from the dictionary
29 replies
CC#
Created by Livid on 10/9/2023 in #help
✅ Comparing properties of a values of lists
i have 2 lists List<Animal> and List<Dog> and both Animal and Dog have the property id i'm trying to insert a list of Dog into the list of Animal but i don't want to insert Animals with duplicate id's
70 replies
CC#
Created by Livid on 10/5/2023 in #help
✅ public or local
hey if i have a class like this
public class Dog {
public int publicInt;
int isThisPublic?;

method() {}
}
public class Dog {
public int publicInt;
int isThisPublic?;

method() {}
}
5 replies
CC#
Created by Livid on 10/4/2023 in #help
✅ shortcut
what's the shortest way of making a variable? for example:
/// NOT VALID CODE (i think)
Form form() {
Width = 100,
}
/// NOT VALID CODE (i think)
Form form() {
Width = 100,
}
11 replies
CC#
Created by Livid on 10/3/2023 in #help
✅ (General Question) Using section
hi why do you use
using(FileStream stream = new FileStream("Document") {
stream.thisIsJustAExample
}
using(FileStream stream = new FileStream("Document") {
stream.thisIsJustAExample
}
what's the point of the Using section / structure?
28 replies
CC#
Created by Livid on 10/2/2023 in #help
✅ Excel
how do i read a excel file / table
49 replies
CC#
Created by Livid on 9/25/2023 in #help
✅ dynamic list type
can you make a list like List<?>
33 replies
CC#
Created by Livid on 9/25/2023 in #help
✅ winform databinding
how to i add a integer to a textbox.text
14 replies
CC#
Created by Livid on 9/25/2023 in #help
✅ Winforms
i have a button with Anchor = AnchorStyles.Bottom | AnchorStyles.Right, property but even though it's the only control in the form it just appears in the top left
12 replies