kuulie
kuulie
CC#
Created by kuulie on 9/8/2023 in #help
✅ Question about access modifiers
If I have a class (internal by default) and a field that is public, can that field be accessed by other assemblies?
34 replies
CC#
Created by kuulie on 4/30/2023 in #help
✅ adding SQLite [Indexed] to a C# class property
Hi I'm trying to understand what it means to add an index to a column and how it speeds up querying. I asked ChatGPT about indexing but I still don't understand the process the SQLite does that makes querying faster. When an index is created on a column in a table, it creates a separate data structure that stores the values of the indexed column in a sorted order. This data structure is known as a B-tree index. ChatGPT: "Let's say you have a table with a column named "age", and you create an index on that column. When you insert data into the table, the indexed column values will be stored in the B-tree index in sorted order. Now, if you execute a query that filters records based on the "age" column, the database engine will consult the B-tree index to quickly locate the rows that match the filter criteria, instead of scanning the entire table. For example, if you have a query that filters records where age is equal to 30, the database engine will search for the portion of the B-tree index that corresponds to the value 30. It will then use the pointers in that portion of the index to directly access the relevant rows in the table, rather than scanning the entire table sequentially."
5 replies
CC#
Created by kuulie on 4/16/2023 in #help
❔ Why is there a green squiggly line under the first Console.ReadLine(); ?
namespace CSharpPractice // had to check no top-level statements { internal class Program { static void Main(string[] args) { Console.WriteLine("Hello, World!"); string message = Console.ReadLine(); // <= green squiggly, CS8600 Console.WriteLine($"Echo: {message}"); Console.ReadLine(); // require user to press Enter to close program } } }
68 replies
CC#
Created by kuulie on 4/10/2023 in #help
✅ Does this styling code look right?
I'm using this code for a simple hover effect. Im wondering if I'm doing this correctly: <Window.Resources> <Style TargetType="Button"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Button}"> <Border Background="{TemplateBinding Background}"> <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/> </Border> </ControlTemplate> </Setter.Value> </Setter> <Style.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Background" Value="Green"/> </Trigger> </Style.Triggers> </Style> </Window.Resources>
4 replies
CC#
Created by kuulie on 4/10/2023 in #help
✅ How to add hover effect to WPF button element
This code I'm using isn't working. When I hover over buttons its a lightblue color. <Style TargetType="Button"> <Setter Property="FontSize" Value="18" /> <Setter Property="FontWeight" Value="Medium" /> <Setter Property="Foreground" Value="#262626" /> <Setter Property="Background" Value="#ECECEC" /> <Setter Property="BorderThickness" Value="0" /> <Style.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Background" Value="#E0E0E0" /> </Trigger> </Style.Triggers> </Style>
7 replies
CC#
Created by kuulie on 4/10/2023 in #help
✅ Set Background color for one specific Row in Grid
1 replies
CC#
Created by kuulie on 4/9/2023 in #help
✅ How to use SVGs in XAML file (WPF)
I have a WPF project and I want to use an svg file in MainWindow.xaml. How do I properly use svg in xaml files? Do I need to convert it into something else?
12 replies
CC#
Created by kuulie on 4/8/2023 in #help
✅ What does the green squiggly mean on VS?
13 replies
CC#
Created by kuulie on 4/7/2023 in #help
✅ How to select duplicates on VS
I'm new to Visual Studio and I'm trying to do something I can do on VSC. I highlighted something in an XAML file and I'm trying to select all other duplicates downward using Cmd + D just like in VSC but its not working. How can I multiselect the duplicates?
17 replies
CC#
Created by kuulie on 4/7/2023 in #help
✅ creating a wpf app
Hi, I'm new to wpf and I'm following an older tutorial that says to create a WPF App (.NET Core) project but I don't see it available. Am I supposed to select WPF App (.NET Framework) ?
11 replies
CC#
Created by kuulie on 12/28/2022 in #help
❔ Publish the API app to Azure App Service
I'm trying to host my API App using Azure but what does the Microsoft tutorial mean by "Solution Explorer"? I'm on Visual Studio and also Azure right now. Complete the following steps to publish the ASP.NET Core web API to Azure API Management: In Solution Explorer, right-click the project and select Publish. In the Publish dialog, select Azure and select the Next button.
4 replies
CC#
Created by kuulie on 12/27/2022 in #help
❔ Ctrl + F5 not working
I created a project in VSC using this command: "dotnet new web -o TodoApi" but when I press Ctrl + F5 nothing happens. I'm trying to run the project
16 replies
CC#
Created by kuulie on 12/14/2022 in #help
❔ Setting up VSC
im trying to output some text from the terminal using Console.WriteLine() but the csc command is not outputting anything. is my VSC not set up correctly?
31 replies