/r/csharp

Photograph via snooOG

All about the object-oriented programming language C#.

Information about Reddit's API changes, the unprofessional conduct of the CEO, and their response to the community's concerns regarding 3rd party apps, moderator tools, anti-spam/anti-bot tools, and accessibility options that will be impacted can be found in the associated Wikipedia article: https://en.wikipedia.org/wiki/2023_Reddit_API_controversy

Alternative C# communities available outside Reddit on Lemmy and Discord:


All about the object-oriented programming language C#.


Getting Started
C# Fundamentals: Development for Absolute Beginners

Useful MSDN Resources
A Tour of the C# Language
Get started with .NET in 5 minutes
C# Guide
C# Language Reference
C# Programing Guide
C# Coding Conventions
.NET Framework Reference Source Code

Other Resources
C# Yellow Book
Dot Net Perls
The C# Player's Guide

IDEs
Visual Studio
MonoDevelop (Windows/Mac/Linux)
Rider (Windows/Mac/Linux)

Tools
ILSpy
dotPeek
LINQPad

Alternative Communities
C# Discord Group
C# Lemmy Community
dotnet Lemmy Community

Related Subreddits
/r/dotnet
/r/azure
/r/learncsharp
/r/learnprogramming
/r/programming
/r/dailyprogrammer
/r/programmingbuddies
/r/cshighschoolers

Additional .NET Languages
/r/fsharp
/r/visualbasic

Platform-specific Subreddits
/r/windowsdev
/r/AZURE
/r/Xamarin
/r/Unity3D
/r/WPDev

Rules:

  • Rule 1: No job postings (For Hire and Hiring)
  • Rule 2: No malicious, intentionally harmful, or piracy-related software
  • Rule 3: Posts should be directly relevant to C#
  • Rule 4: Request-for-help posts should be made with effort
  • Rule 5: No hostility towards users for any reason
  • Rule 6: No spam of tools/companies/advertisements
  • Rule 7: Submitted links to be made with effort and quality
  • Rule 8: No unattributed use or automated use of AI Generation Tools

Read detailed descriptions of the rules here.

/r/csharp

283,192 Subscribers

1

Combining Central Package Management with a Blazor WASM app and a ASP.NET Web API

Is this possible?

<PropertyGroup>     <TargetFramework>net8.0</TargetFramework>     <ImplicitUsings>enable</ImplicitUsings> </PropertyGroup>  <ItemGroup>     <PackageReference Include="Microsoft.AspNetCore.Components.Web"/>     <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly"/>     <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" PrivateAssets="all"/>     <PackageReference Include="Microsoft.Authentication.WebAssembly.Msal"/>     <PackageReference Include="Microsoft.Extensions.Http"/>     <PackageReference Include="Microsoft.Extensions.Logging.Configuration"/> </ItemGroup>

This is my project file, after switching to CPM.

The moment I add one package from my ASP.NET Core WebAPI project to the Directory.Build.props my Blazor WASM app doesn't compile anymore, and I am greeted with the age old

There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier ‘browser-wasm’.

Am I being stupid? I thought you only specify your references at one place, but that doesn't mean they get included immediately into every build you do. Or am I doing something wrong?

1 Comment
2025/02/04
18:09 UTC

1

How to make WPF DataGrid select entire cell content.

I am developing an ERP system for inventory control using WPF. In my application, I have a DataGrid where users can input item codes. If the item code does not exist in my ViewModel, I display an error message and try to set focus back to the DataGrid cell where the error occurred, allowing the user to edit the cell again. However, while it stays on the cell that triggered the error, it doesn't select the entire content of the cell.

Here is the relevant part of my code:

https://preview.redd.it/v97kdp9vg4he1.png?width=949&format=png&auto=webp&s=6bf85c397bc743fb159f30d0539a2c0615c3b6eb

What am I missing or doing wrong that prevents the entire content of the cell from being selected?

//

I managed to fix it by adding a line of code. I think I'm very dumb.

https://preview.redd.it/5dbd4jqay5he1.png?width=944&format=png&auto=webp&s=753b7854a1f63782277b0af94a5b9a1e44d9c22a

4 Comments
2025/02/04
13:13 UTC

4

Listview filtering

Hello everyone I wanna add a filter to my litview similar to the one in Excel (checkboxes). I tried Copilot and Chatgpt and all they did was suggest a textbox or a combox on top of the listview to filter but I need it like the one in Excel. If It's not possible to do that with listview are there other components that it might work with ? Thanks

2 Comments
2025/02/04
10:40 UTC

4

How i can get feedback form a opensource project ?

Actually i have a proyect with 1.7K nuget downloads, but i dont receive any feedbak. I want to know strategies to improve give me feedback, and try to begin to create a community.

Thanks a lot !

10 Comments
2025/02/04
08:56 UTC

1

Looking for a Complete ASP.NET Core Web API Course for E-Commerce System

I'm looking for a comprehensive course that uses ASP.NET Core Web API to build a complete e-commerce system. Do you have any recommendations for a course or any useful resources to help with this?

1 Comment
2025/02/04
08:35 UTC

1

How do value type methods modify the caller object through 'this' ?

I have started getting into C# recently. As I am familiar with C++, I know that member methods of a class has 'this' pointer to refer to the caller object. But what is the case in C# with value types? How is 'this' reference passed to the member method. I have searched a lot with no answer to this question. Is it passed by reference or by value? and if the latter, how are any modifications to it affect the caller object if it is just a mere copied value from it?

I would appreciate if you supported your answer with any resources.

I mean like this but with value types not classes:
It's from C# 10 Pro book
// This is JUST pseudocode!

.method public hidebysig static int32 AddTwoIntParams(

{ MyClass_HiddenThisPointer this, int32 a, int32 b) cil managed

ldarg.0 // Load MyClass_HiddenThisPointer onto the stack.

ldarg.1 // Load "a" onto the stack.

ldarg.2 // Load "b" onto the stack.

...

}

13 Comments
2025/02/04
06:06 UTC

8

What is the recommended way to store email templates?

I am working on a .NET 9 project web API and I am using Code First Migrations for database update?

As I am in the starting phase I switched databases 2 or 3 times after deleting them from server (I am using PostgreSQL). I created email templates in the database and after switching to another database I have to make sure that I copy the email templates from my previous database template table to the new database.

So, later when I have to move to production and have to purchase or use a new database for production environment I have to move all my email templates manually to the production database.

I found it bit cumbersome and want a simple solution. What is a good approach that is followed enterprise level to store and handle email templates. Easily manageable in both development and production environment.

Also, just wanna add another question quickly?

Is code first migration a better approach for a growing project?

17 Comments
2025/02/04
05:10 UTC

0

Weird NuGet Error Only in Prod Docker Build

Removed a JsonConverter (string → enum) from a specific enum, and now a private dependency in another project in our repo fails—but only when building our prod Docker image. Works fine locally.

Putting the converter back fixes it, even though the projects are completely unrelated.

Anyone seen this before?

14 Comments
2025/02/04
04:16 UTC

3

New grad SWE interview in a couple days... need guidance.

Hi everyone,

I have a SWE-I (New Grad) interview in a couple days where they recruiter said the next round of interviews is technical and will contain "basic questions related to C# and .NET". I was hoping if anyone here can suggest some of the topics/questions that I can expect/should know for a new grad position.

Thank you so much for your time!

4 Comments
2025/02/04
02:59 UTC

6

How can I improve my knowledge of C# to contribute to my team?

I recently got a job at a company in the region, and it took me by surprise, until then I had only learned Python and never worked professionally, but I passed the job interview and later passed the C# challenge they sent me. , the challenge was very simple, it was enough to build a windows forms with the name, price and quantity fields, display them in a datagridview and add edit/delete functions, the test was so simple that the evaluators said the code didn't even need to run, they would evaluate more my programming logic.

I passed this test and started working at the company, but the project I'm working on now is absurdly bigger and more complex, and I'm getting lost a lot, constantly needing help to solve the tickets that come to me, I'm studying C# now with courses from udemy, but as I just leave work and go straight to college I have little time to study, would there be any tips for me to improve my performance in the company, who has worked with .NET, what was it like when you started? I'm learning a lot of things while fixing the tickets but I'm using chatgpt a lot and I'd like to learn how to do it without depending on AIs for this, any recommendations other than just studying C# and SQL?

5 Comments
2025/02/04
01:04 UTC

116

I love writing in c# but I hate XAML

Currently building a windows app with WinUI3, I feel that tackling and learning defining controls with XAML was the least productive time spent. So as time went by I gave up most of my attempts to do templates or bindings and most of my controls are built with c# code, only a few styles defined for HotReload.

Now I am about to build a new UI element and every attempt to use XAML had led to waste of many hours with very slow painful progress. I feel I could have coded all I need + an in-app color picker with fraction of the time. To be honest I am about to give up on XAML all together, what are my options?

92 Comments
2025/02/04
00:00 UTC

0

Parse MFT and get names of deleted files

I want to write code in C# to parse the MFT and get the names of files that are deleted. I have searched many websites but I have not found a good solution. I took help from ChatGPT but it was also not helpful. Is there any way for doing this?

2 Comments
2025/02/03
23:21 UTC

0

Are developers hated?

Since ChatGPT 3.5 released and there is a glimpse that AI might write all our code, no matter how big, complex, and nuanced the Program will be, it seems like so many people just can't wait for Developers to lose their Jobs and seem happy about it, in a "Schadenfreude" kind of way, which means being happy about the damage done to someone.

Am I misinterpreting something or do you guys feel the same?

26 Comments
2025/02/03
20:46 UTC

0

Memory Game

Would someone be able to help me with the basics of coding a memory game? I have a project due in 2 days and I’m stuck on this. I use picture boxes. And I know this code is fucked - so don’t mention it 🫣. I don’t have the time to sit here and ponder on how to do things. The tutorials online don’t work with my project.

public partial class frmCh4 : Form { Random random = new Random(); Player player; PictureBox firstOption, secondOption; PictureBox[] pictureBoxes;

    public frmCh4()
    {
        InitializeComponent();
    }

    public frmCh4(Player playerPassedIn)
    {
        InitializeComponent();
        player = playerPassedIn;
        player.Score = 0;

        pictureBoxes = new PictureBox[] { pbxCard1, pbxCard2, pbxCard3, pbxCard4, pbxCard5, pbxCard6, pbxCard7, pbxCard8, pbxCard9, pbxCard10 };

        foreach (PictureBox pbx in pictureBoxes)
        {
            pbx.Click += CardsClick;
        }

        SetCards();
    }

    private List<string> cardImages = new List<string>
    {
       "CH4Cards\\Q1ShiningV.png","CH4Cards\\Q1ShiningP.png",
       "CH4Cards\\Q2NunV.png","CH4Cards\\Q2NunP.png",
       "CH4Cards\\Q3MichealV.png","CH4Cards\\Q3MichealP.png",
       "CH4Cards\\Q4FreddyV.png","CH4Cards\\Q4FreddyP.png",
       "CH4Cards\\Q5ScreamV.png","CH4Cards\\Q5ScreamP.png",
    };

    private void ShuffleCards()
    {
        for (int i = cardImages.Count - 1; i > 0; i--)
        {
            int j = random.Next(i + 1);
            string temp = cardImages[i];
            cardImages[i] = cardImages[j];
            cardImages[j] = temp;
        }
    }
    private void SetCards()
    {
        ShuffleCards();

        for (int i = 0; i < pictureBoxes.Length; i++)
        {
            pictureBoxes[i].Tag = cardImages[i];
            pictureBoxes[i].ImageLocation = "CH4Cards\\BlankCardCH4.png";
        }
    }
    private void CardsClick(object sender, EventArgs e)
    {
        PictureBox clickedCard = sender as PictureBox;

        if (clickedCard == null || clickedCard.ImageLocation != "CH4Cards\\BlankCardCH4.png")
            return;

        clickedCard.ImageLocation = clickedCard.Tag.ToString();

        if (firstOption == null)
        {
            firstOption = clickedCard;
        }
        else
        {
            secondOption = clickedCard;

            if (firstOption.Tag.Equals(secondOption.Tag))
            {
                player.Score++;
                lblScore.Text = string.Format("{0}", player.Score.ToString());
                Sound.Correct();
                firstOption = null;
                secondOption = null;
            }
            else
            {
                firstOption.ImageLocation = "CH4Cards\\BlankCardCH4.png";
                secondOption.ImageLocation = "CH4Cards\\BlankCardCH4.png";
                firstOption = null;
                secondOption = null;
                tmrCardFlip.Stop();
            }
            tmrCardFlip.Start();
        }
    }

    private void tmrCardFlip_Tick(object sender, EventArgs e)
    {
        int ticks;
        ticks = 0;
        ticks++;

        if (ticks == 1)
        {
            if (firstOption != null && secondOption != null)
            {
                firstOption.ImageLocation = "CH4Cards\\BlankCardCH4.png";
                secondOption.ImageLocation = "CH4Cards\\BlankCardCH4.png";
            }
            firstOption = null;
            secondOption = null;
            tmrCardFlip.Stop();
        }
    }

    private void frmCh4_Load(object sender, EventArgs e)
    {

    }
}

And if this code is truly unsalvageable ( it probably is) then how do I actually do this.

0 Comments
2025/02/03
20:29 UTC

0

Im planning on getting started with c# programming

I will start c# in a few days, that’s my first programming language ill learn. Where should i start from? Its so confusing

13 Comments
2025/02/03
19:54 UTC

1

Does anyone know why my stuff are offset very slightly to top left corner?

Im using windows forms with slight edits, making simple game, when I'm minimized, aka game starts in 640x360 its correct by the looks, but when I got fullscreen its annoyingly offset tiny bit, maybe by like 1 pixel, or less, I'm using on screen crosshair to basically see if its offset from center, the crosshair is correct.

https://preview.redd.it/5q7fd22y8zge1.png?width=1037&format=png&auto=webp&s=34d46d101bf59ca2fb6f4d8fb84b93be56706d9c

15 Comments
2025/02/03
19:45 UTC

0

I need to learn the basics of C# in about a month?

so I just started a game development class in my community college (netherlands) and I'm trying to make an indie game with GoDot using GDScript and C# and wanted to ask if anyone had good tutorials showing the basics for C# materials I'd neef for an indie game... I have about 16 weeks to finish the entire project and I'm not gonna try and make a VERY good game just something that runs

23 Comments
2025/02/03
18:58 UTC

0

Doing A level Computer science C#, any past students have advice?

anything helps

10 Comments
2025/02/03
18:22 UTC

0

Request still reaching the controller's action method even on AuthenticateResult.Fail()

I want to short circuit my request upon Authentication failure so that it does not reach my controller, how can it be achieved here?

Code:

public class JwtAuthenticationHandler(
    IOptionsMonitor<AuthenticationSchemeOptions> options,
    ILoggerFactory logger,
    UrlEncoder encoder,
    IJwtService jwtService,
    IConfiguration configuration) : AuthenticationHandler<AuthenticationSchemeOptions>(options, logger, encoder)
{
    private const string Version = "version";
    private const string InvalidTokenResponse = "Invalid authentication token";

    private readonly ILogger<JwtSecurityTokenHandler> _logger = logger.CreateLogger<JwtSecurityTokenHandler>();
    protected override async Task<AuthenticateResult> HandleAuthenticateAsync()
    {
        var authToken = ExtractTokenFromHeader(Request.HttpContext);
        if (string.IsNullOrEmpty(authToken))
        {
            Response.StatusCode = StatusCodes.Status401Unauthorized;
            await Response.WriteAsJsonAsync(new Response().Unauthorized(InvalidTokenResponse));
            return AuthenticateResult.Fail(InvalidTokenResponse);
        }

        var claimsPrincipal = ValidateToken(authToken);
        if (claimsPrincipal is null)
        {
            Response.StatusCode = StatusCodes.Status401Unauthorized;
            await Response.WriteAsJsonAsync(new Response().Unauthorized(InvalidTokenResponse));
            return AuthenticateResult.Fail(InvalidTokenResponse);
        }

        var email = claimsPrincipal.FindFirst(ClaimTypes.Email)?.Value;
        if (string.IsNullOrEmpty(email))
        {
            Response.StatusCode = StatusCodes.Status401Unauthorized;
            await Response.WriteAsJsonAsync(new Response().Unauthorized(InvalidTokenResponse));
            return AuthenticateResult.Fail(InvalidTokenResponse);
        }
        var tokenVersion = claimsPrincipal.FindFirst(Version)?.Value;
        if (string.IsNullOrEmpty(tokenVersion))
        {
            Response.StatusCode = StatusCodes.Status401Unauthorized;
            await Response.WriteAsJsonAsync(new Response().Unauthorized(InvalidTokenResponse));
            return AuthenticateResult.Fail(InvalidTokenResponse);
        }

        var currentTokenVersion = jwtService.GetTokenUserVersion(email);

        if (tokenVersion != currentTokenVersion)
        {
            _logger.LogWarning("Invalid token version detected for user: {Email}", email);
            Response.StatusCode = StatusCodes.Status401Unauthorized;
            await Response.WriteAsJsonAsync(new Response().Unauthorized("Token is outdated. Please generated a new one."));
            return AuthenticateResult.Fail("Token is outdated");
        }

        var claims = new[] { new Claim(ClaimTypes.Email, email) };
        var identity = new ClaimsIdentity(claims, JwtBearerDefaults.AuthenticationScheme);
        var principal = new ClaimsPrincipal(identity);
        var ticket = new AuthenticationTicket(principal, JwtBearerDefaults.AuthenticationScheme);
        return AuthenticateResult.Success(ticket);
    }

    protected override async Task HandleChallengeAsync(AuthenticationProperties properties)
    {
        Response.StatusCode = StatusCodes.Status401Unauthorized;
        await Response.WriteAsJsonAsync(new Response().Unauthorized(InvalidTokenResponse));
    }

    private static string? ExtractTokenFromHeader(HttpContext context)
    {
        var authHeader = context.Request.Headers.Authorization.ToString();
        if (authHeader.IsNullOrEmpty() || !authHeader.StartsWith("Bearer "))
        {
            return null;
        }

        return authHeader["Bearer ".Length..];
    }

    private ClaimsPrincipal? ValidateToken(string token)
    {
        var secret = Encoding.UTF8.GetBytes(configuration["Jwt:Secret"]!);

        var tokenValidationParameters = new TokenValidationParameters()
        {
            ValidateIssuerSigningKey = true,
            IssuerSigningKey = new SymmetricSecurityKey(secret),
            ValidateIssuer = true,
            ValidIssuer = configuration["Jwt:Issuer"],
            ValidateAudience = true,
            ValidAudience = configuration["Jwt:Audience"],
            ValidateLifetime = true
        };

        try
        {
            return new JwtSecurityTokenHandler().ValidateToken(token, tokenValidationParameters, out _);
        }
        catch (SecurityTokenException ex)
        {
            _logger.LogWarning("Token validation failed: {Message}", ex.Message);
            return null;
        }
    }
}
3 Comments
2025/02/03
17:52 UTC

4

Microsoft Store Registration Promo Code

I am a solo developer. I have developed a simple app. I want to publish it on Microsoft Store for free. There is a fee payment screen for publishing an app. (I don't know if it is a yearly or monthly payment). There is a Promotion Code tab on the screen where you enter your credit card information. In the past, promo codes were distributed to participants in Azure meetups. Is this something like that? I moved out of town and can no longer attend Microsoft meetups. How can I get this promo code? I would be very grateful if you could direct me. Thanks.

https://preview.redd.it/eupmusbudyge1.png?width=718&format=png&auto=webp&s=a9e6eab41769c94345fb09eac649ea48ae0f5946

4 Comments
2025/02/03
16:44 UTC

3

DI - Advice on shutting down services to run a task

Hi all,

I will preface by saying, I am still learning DI and how all this fits together.

Here is my scenario:

In my application, I have some 'database services'. i.e. services that depend on the database connection. Specifically, these are repositories, database factory, etc.

The second type of service, lets call this BackupService, needs to free the lock on the database and stop all the database services to run various tasks. This service is long running, so keeping tabs on it is critical.

So, the flow would look like this...

1.) BackupService is called (some other non-db related DI services are injected here).

2.) DB services are shut down.

3.) Tasks are ran.

4.) Application shuts down or restarts.

That's my idea anyway. What I am unsure of is how to handle shutting down the DB services. Its a lot of manual code that goes through and checks if an IServiceCollection contains X type of dependency and disposes it. It just seems kind of.... code smelly. Maybe the DB services need added to a specific service collection and that specific collection is passed to the BackupService?

Wondering how you would handle this?

Thank you for your help.

--------------------

Additional info: I may be asked Does the DB services really need to be shut down? The answer is not *technically*, but then all the DB services would need altered after BackupTask runs. So, rather than manually alter a bunch of services, I would just like to close the application and restart.

8 Comments
2025/02/03
16:43 UTC

3

Is it possible to add a constructor to a class via extension method?

Let’s say I have a POCO that normally takes in a couple of parameters in its constructor. Would it be possible to add an extension method to construct an instance of said class by passing in something like an XElement? I know I can add an extension method to get an instance of an XElement from the class, that’s easy. I’m just curious if it can work the other way around.

20 Comments
2025/02/03
15:42 UTC

0

.NET or Django for Backend? AI/ML Career with Backend Knowledge

I'm a BTech student aiming for an AI/ML role at top tech companies but also want strong backend development knowledge. I'm choosing between .NET and Django for backend. Since my main goal is AI/ML, which one would be the better choice to complement it?

9 Comments
2025/02/03
11:11 UTC

12

Why does one Linq query take considerably more time than the other?

Hi, I have the following Linq queries:

(A) (click here if it does not render properly)

RisultatoScraping? alreadyExists = await _context.RisultatoScrapings                 .Where(x => x.LinkedinUrl == linkedinUrl)                 .Include(r => r.Person)                     .ThenInclude(p => p.Certifications)                 .Include(r => r.Person)                     .ThenInclude(p => p.Educations)                 .Include(r => r.Person)                     .ThenInclude(p => p.Positions)                 .Include(r => r.Company)                     .ThenInclude(q => q.Headquarter)                 .FirstOrDefaultAsync(); RisultatoScraping? alreadyExists = await _context.RisultatoScrapings                 .Where(x => x.LinkedinUrl == linkedinUrl)                 .Include(r => r.Person)                     .ThenInclude(p => p.Certifications)                 .Include(r => r.Person)                     .ThenInclude(p => p.Educations)                 .Include(r => r.Person)                     .ThenInclude(p => p.Positions)                 .Include(r => r.Company)                     .ThenInclude(q => q.Headquarter)                 .FirstOrDefaultAsync();

and (B) (click here if it does not render properly)

RisultatoScraping? alreadyExists = await _context.RisultatoScrapings     .Where(x => x.LinkedinUrl == linkedinUrl)     .FirstOrDefaultAsync(); RisultatoScraping? alreadyExists = await _context.RisultatoScrapings     .Where(x => x.LinkedinUrl == linkedinUrl)     .FirstOrDefaultAsync();                   

It is clear that (A) is slower than (B), but if (B) returns null (so there is nobody with that linkedinUrl), why is (A), with the same linkedinUrl , so much slower that it timeouts?

I mean, if RisultatoScraping is null, Includes should not take any meaningful extra time, so that's why I don't understand why it takes so much time.

Also, I added this to (B) (link to the image)

context.Entry(alreadyExists)                     .Reference(r => r.Person)                     .Load();                  if (alreadyExists.Person != null)                 {                     _context.Entry(alreadyExists.Person)                         .Collection(p => p.Certifications)                         .Load();                     _context.Entry(alreadyExists.Person)                         .Collection(p => p.Educations)                         .Load();                     _context.Entry(alreadyExists.Person)                         .Collection(p => p.Positions)                         .Load();                 }                  _context.Entry(alreadyExists)                     .Reference(r => r.Company)                     .Load();                  if (alreadyExists.Company != null)                 {                     _context.Entry(alreadyExists.Company)                         .Reference(c => c.Headquarter)                         .Load();                 }

And it's still faster than (A) when risultatoScraping is not null.

Thank you

19 Comments
2025/02/03
10:41 UTC

0

How can I make ScottPlot charts fill the available window

Having some difficulty with ScottPlot at the moment.

I find that the plots don't appear unless I give them a height and width attribute in the XAML. At which point, they end up being a fixed size rather than filling the available size.

For example I'm using the below code to get a chart up and showing. If I skip the Height and Width parameters in the <ScottPlot> part of the XAML then nothing shows up in the Window. If I add in the 100x100 parameters then I get a small chart. Trying alternative parameters like Auto or * or 100% gives me errors.

XAML:

In the main Window tag:

xmlns:ScottPlot="clr-namespace:ScottPlot.WPF;assembly=ScottPlot.WPF"

In the body of the window:

<TabControl>
    <TabItem Header="Test Chart">
        <ScottPlot:WpfPlot Name="WpfPlot1" Height="100" Width="100" />
    </TabItem>
</TabControl>

XAML.CS:

public MainWindow()
{
    InitializeComponent();
 
    double[] dataX = { 1, 2, 3, 4, 5 };
    double[] dataY = { 1, 4, 9, 16, 25 };
    WpfPlot1.Plot.Add.Scatter(dataX, dataY);
    WpfPlot1.Refresh();
}
5 Comments
2025/02/03
09:42 UTC

2

Can I register my app in Azure as a person, not a business entity?

The app I'm working on uses Google Drive's API and OneDrive's API to sync between the user's 2 cloud provider folders. I know there's a ton of great apps that already do this, but I'm doing this for fun

Google Drive's registration was simple enough through GCP, but I'm stuck on Azure (Microsoft part basically). Do I have to be a business entity to register the app and get a client ID and client secret? The process seems complicated to me, maybe I'm just dumb

4 Comments
2025/02/03
09:00 UTC

2

C# Framework For Drone Ground Control and Video Streaming

Hi everyone, I'm a long time Python, Go and web developer who now needs to dive into developing a Windows based application for the purpose of serving as a drone ground controller and streaming real time high resolution videos from the drone. With some preliminary research, I'm gravitating towards WPFUI with LibVLCSharp at the moment but would greatly appreciate any inputs/suggestions from devs more experienced with C#.

At this point, the considerations are between WPF, WinUI 3, Flutter (prior experience) or Tauri.

2 Comments
2025/02/03
08:44 UTC

Back To Top