Click here to Skip to main content
15,894,311 members
Home / Discussions / C#
   

C#

 
AnswerRe: Transfer data between MFC Application and c# application using NamedPipe Pin
JudyL_MD13-Oct-23 5:05
JudyL_MD13-Oct-23 5:05 
QuestionCreating a JSON File from a CSV file in C# Pin
Member 1611347712-Oct-23 2:19
Member 1611347712-Oct-23 2:19 
AnswerRe: Creating a JSON File from a CSV file in C# Pin
OriginalGriff12-Oct-23 2:29
mveOriginalGriff12-Oct-23 2:29 
AnswerRe: Creating a JSON File from a CSV file in C# Pin
jschell12-Oct-23 5:17
jschell12-Oct-23 5:17 
AnswerRe: Creating a JSON File from a CSV file in C# Pin
Gerry Schmitz12-Oct-23 8:36
mveGerry Schmitz12-Oct-23 8:36 
GeneralRe: Creating a JSON File from a CSV file in C# Pin
OriginalGriff12-Oct-23 9:07
mveOriginalGriff12-Oct-23 9:07 
GeneralRe: Creating a JSON File from a CSV file in C# Pin
Gerry Schmitz12-Oct-23 9:28
mveGerry Schmitz12-Oct-23 9:28 
GeneralRe: Creating a JSON File from a CSV file in C# Pin
OriginalGriff12-Oct-23 10:20
mveOriginalGriff12-Oct-23 10:20 
GeneralRe: Creating a JSON File from a CSV file in C# Pin
jschell13-Oct-23 7:09
jschell13-Oct-23 7:09 
QuestionItemObservableCollection Pin
rex648-Oct-23 7:34
rex648-Oct-23 7:34 
AnswerRe: ItemObservableCollection Pin
Gerry Schmitz8-Oct-23 7:55
mveGerry Schmitz8-Oct-23 7:55 
QuestionHow do I use Visual Studio user secrets and GitHub secrets, in the same project? Pin
Rod at work4-Oct-23 11:32
Rod at work4-Oct-23 11:32 
AnswerRe: How do I use Visual Studio user secrets and GitHub secrets, in the same project? Pin
Richard MacCutchan4-Oct-23 20:55
mveRichard MacCutchan4-Oct-23 20:55 
GeneralRe: How do I use Visual Studio user secrets and GitHub secrets, in the same project? Pin
Rod at work5-Oct-23 2:38
Rod at work5-Oct-23 2:38 
GeneralRe: How do I use Visual Studio user secrets and GitHub secrets, in the same project? Pin
Richard MacCutchan5-Oct-23 2:43
mveRichard MacCutchan5-Oct-23 2:43 
GeneralRe: How do I use Visual Studio user secrets and GitHub secrets, in the same project? Pin
Rod at work5-Oct-23 3:24
Rod at work5-Oct-23 3:24 
GeneralRe: How do I use Visual Studio user secrets and GitHub secrets, in the same project? Pin
Rod at work5-Oct-23 3:54
Rod at work5-Oct-23 3:54 
GeneralRe: How do I use Visual Studio user secrets and GitHub secrets, in the same project? Pin
Richard MacCutchan5-Oct-23 4:18
mveRichard MacCutchan5-Oct-23 4:18 
AnswerRe: How do I use Visual Studio user secrets and GitHub secrets, in the same project? Pin
jschell5-Oct-23 5:48
jschell5-Oct-23 5:48 
GeneralRe: How do I use Visual Studio user secrets and GitHub secrets, in the same project? Pin
Rod at work5-Oct-23 10:33
Rod at work5-Oct-23 10:33 
GeneralRe: How do I use Visual Studio user secrets and GitHub secrets, in the same project? Pin
jschell6-Oct-23 7:10
jschell6-Oct-23 7:10 
QuestionBeginner: Return properties from another Class Pin
Member 159530273-Oct-23 23:58
Member 159530273-Oct-23 23:58 
AnswerRe: Beginner: Return properties from another Class Pin
Gerry Schmitz4-Oct-23 4:32
mveGerry Schmitz4-Oct-23 4:32 
AnswerRe: Beginner: Return properties from another Class Pin
Dave Kreskowiak4-Oct-23 5:36
mveDave Kreskowiak4-Oct-23 5:36 
First, you're return type is a Task<string>, not what you're really returning, so you have to fix that.

Next, the return statement just needs the "object" part removed.

Lastly, the other answer is correct. You're jumping in the deep end without knowing how to swim.

This is NOT tested, so don't go expecting this to work immediately:
C#
public async TVShow GetTvShowData()
{
    HttpClient client = new HttpClient();

    var content = await client.GetStringAsync("https://api.themoviedb.org/3/tv/136311?api_key=XXXXXXX&language=en-US");

    TVShow myDeserializedClass = JsonConvert.DeserializeObject<TVShow>(content);

    return myDeserializedClass;
}


QuestionUsing await/async Correctly Pin
Kevin Marois25-Sep-23 12:30
professionalKevin Marois25-Sep-23 12:30 

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.