dotnet / dotnet/dotnet-api-docs

Example in Graphics.FromImage(Image) Method Does Not work

Open
#10,502 4 comments 0 reactions 0 assignees View on GitHub
area-System.Drawing Pri3 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

### Type of issue

Code doesn't work

### Description

[Enter feedback here]
Code example when pasted into Windows Forms causes an error. The error
![image](https://github.com/user-attachments/assets/2b1a8717-32ae-4666-b29f-9f91ecfe8dc8)

First the information on Graphics.FromImage(Image) Method is so vague anyone who does no already know how to use it gain nothing from the page.

Second the information on Graphics.FromImage(Image) Method is so vague it give no clue where the example code goes in the Windows Forms or how to call it

It seem that any article from microsoft that has a article author of @dotnet-bot has broken code and has cryptic information.

It seem that any example in microsoft's "Learn" documents should to should be detailed enough for someone to "Lean" from

### Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.drawing.graphics.fromimage?view=net-8.0&redirectedfrom=MSDN#System_Drawing_Graphics_FromImage_System_Drawing_Image_

### Content source URL

https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Drawing/Graphics.xml

### Document Version Independent Id

5c2e068b-9590-00ef-41c6-a0ad249716c7

### Article author

@dotnet-bot

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.