Click here to Skip to main content
16,004,587 members
Home / Discussions / C#
   

C#

 
AnswerRe: SqlDataReader with multiple result sets Pin
Pete O'Hanlon26-Jul-24 5:32
mvePete O'Hanlon26-Jul-24 5:32 
GeneralRe: SqlDataReader with multiple result sets Pin
Richard Andrew x6426-Jul-24 5:40
professionalRichard Andrew x6426-Jul-24 5:40 
AnswerRe: SqlDataReader with multiple result sets Pin
OriginalGriff26-Jul-24 6:08
mveOriginalGriff26-Jul-24 6:08 
GeneralRe: SqlDataReader with multiple result sets Pin
Richard Andrew x6426-Jul-24 6:39
professionalRichard Andrew x6426-Jul-24 6:39 
QuestionI want to get permission to interact with a file. Pin
Yohan Bischofberger25-Jul-24 9:15
Yohan Bischofberger25-Jul-24 9:15 
QuestionRe: I want to get permission to interact with a file. Pin
Richard MacCutchan25-Jul-24 10:24
mveRichard MacCutchan25-Jul-24 10:24 
QuestionC# Trying to Create Custom Spell Checking Feature but keep running into roadblocks. Argument 1: cannot convert from 'System.IO.MemoryStream' to 'string' Argument 2: cannot convert from 'System.Drawing.Imaging.ImageFormat' to 'Tesseract.ImageFormat?' Pin
Texas-Tundra24-Jul-24 6:46
Texas-Tundra24-Jul-24 6:46 
AnswerRe: C# Trying to Create Custom Spell Checking Feature but keep running into roadblocks. Argument 1: cannot convert from 'System.IO.MemoryStream' to 'string' Argument 2: cannot convert from 'System.Drawing.Imaging.ImageFormat' to 'Tesseract.ImageForma Pin
OriginalGriff24-Jul-24 18:58
mveOriginalGriff24-Jul-24 18:58 
Dumping a pile of code on us and saying "it don't work" doesn't help anyone: we have no idea where in that code the error might be occurring and no way to run it to find out.

To help normal humans read it, I've edited your question and added code blocks to separate the files and preserve the formatting but you should check that I didn't mess something up - particularly as your indentation is inconsistent!

We can't tell you "do this" and it'll fix it: start by looking at the error message closely as it'll tell you where in that the error occurs. You should expect to get syntax errors every day, probably many times a day while you are coding - we all do regardless of how much experience we have! Sometimes, we misspell a variable, or a keyword; sometimes we forget to close a string or a code block. Sometimes the cat walks over your keyboard and types something really weird. Sometimes we just forget how many parameters a method call needs.

We all make mistakes.

And because we all do it, we all have to fix syntax errors - and it's a lot quicker to learn how and fix them yourself than to wait for someone else to fix them for you! So invest a little time in learning how to read error messages, and how to interpret your code as written in the light of what the compiler is telling you is wrong - it really is trying to be helpful!

So read this: How to Write Code to Solve a Problem, A Beginner's Guide Part 2: Syntax Errors[^] - it should help you next time you get a compilation error!

And spending a little time learning to understand syntax error messages will save you a huge amount of time in future: you waited at least 1/4 hour for Chris to reply, then your email system probably added another 10 minutes or so, plus the time it took you to type up the question once you had found this site and created an account. Chances are that you could have saved a significant chunk of that time if you knew how to read them!

I'm not saying we don't want to help you fix them - sometimes I can't see my own errors because I read what I meant to write - but fixing syntax errors is part of the job, and if you can't do it for yourself people are going to look at you as a bit weird should you get a job in the industry!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!

GeneralRe: C# Trying to Create Custom Spell Checking Feature but keep running into roadblocks. Argument 1: cannot convert from 'System.IO.MemoryStream' to 'string' Argument 2: cannot convert from 'System.Drawing.Imaging.ImageFormat' to 'Tesseract.ImageForma Pin
Texas-Tundra25-Jul-24 2:08
Texas-Tundra25-Jul-24 2:08 
GeneralRe: C# Trying to Create Custom Spell Checking Feature but keep running into roadblocks. Argument 1: cannot convert from 'System.IO.MemoryStream' to 'string' Argument 2: cannot convert from 'System.Drawing.Imaging.ImageFormat' to 'Tesseract.ImageForma Pin
OriginalGriff25-Jul-24 2:39
mveOriginalGriff25-Jul-24 2:39 
GeneralRe: C# Trying to Create Custom Spell Checking Feature but keep running into roadblocks. Argument 1: cannot convert from 'System.IO.MemoryStream' to 'string' Argument 2: cannot convert from 'System.Drawing.Imaging.ImageFormat' to 'Tesseract.ImageForma Pin
Texas-Tundra25-Jul-24 2:45
Texas-Tundra25-Jul-24 2:45 
GeneralRe: C# Trying to Create Custom Spell Checking Feature but keep ... Pin
OriginalGriff25-Jul-24 2:50
mveOriginalGriff25-Jul-24 2:50 
QuestionDPI issue when calling C# from C++ Pin
JudyL_MD23-Jul-24 11:05
JudyL_MD23-Jul-24 11:05 
AnswerRe: DPI issue when calling C# from C++ Pin
Richard Andrew x6423-Jul-24 12:08
professionalRichard Andrew x6423-Jul-24 12:08 
GeneralRe: DPI issue when calling C# from C++ Pin
JudyL_MD23-Jul-24 17:26
JudyL_MD23-Jul-24 17:26 
QuestionLog file advice? Pin
geomeo12318-Jul-24 15:12
geomeo12318-Jul-24 15:12 
AnswerRe: Log file advice? Pin
jschell19-Jul-24 13:24
jschell19-Jul-24 13:24 
GeneralRe: Log file advice? Pin
Richard Andrew x6420-Jul-24 14:37
professionalRichard Andrew x6420-Jul-24 14:37 
GeneralRe: Log file advice? Pin
geomeo12324-Jul-24 3:38
geomeo12324-Jul-24 3:38 
GeneralRe: Log file advice? Pin
jschell24-Jul-24 14:48
jschell24-Jul-24 14:48 
AnswerRe: Log file advice? Pin
Richard MacCutchan24-Jul-24 5:13
mveRichard MacCutchan24-Jul-24 5:13 
GeneralRe: Log file advice? Pin
Rob Philpott24-Jul-24 22:44
Rob Philpott24-Jul-24 22:44 
GeneralRe: Log file advice? Pin
jschell31-Jul-24 14:02
jschell31-Jul-24 14:02 
QuestionTables not appearing as classes Pin
Hesam emami9-Jul-24 23:17
Hesam emami9-Jul-24 23:17 
AnswerRe: Tables not appearing as classes Pin
Dave Kreskowiak10-Jul-24 2:56
mveDave Kreskowiak10-Jul-24 2:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.