C# Corner

C# Corner

  • Tech Writer
  • 8
  • 1.4k

editing struct?

Dec 8 2018 7:29 AM
want to edit struct to give new title of the movie struct to be GoodFellas and the director to be Martin Scorsese 
 
have tried below but cant figure it out.
 
using System;

namespace HelloWorld
{
class Program
{
public struct Movie
{
public string Title;
public string Director;
}

static void Main(string[] args)
{
Movie movie;

movie.Title = new movie.Title "GoodFellas";
movie.Director = new movie.Director "Martin Scorsese";

Console.WriteLine(movie.Director + " directed " + movie.Title);
}
}
}

Answers (1)