title: Google Protocol Buffers - setting a field.
body: <p>I'm using Google Protocol Buffers with C# and I'm unable to set a field for an object I have. I have two .proto files: filepath.proto and filepaths.proto. Filepaths.proto contains a repeated field for Filepath.proto messages. Here are both files:</p>
  
  <pre><code>// filepath.proto
  
  syntax = "proto3";
  package TEST;
  
  message FilePath
  {
     string path = 1;
  }
  
  // filepaths.proto
  syntax = "proto3";
  import "filepath.proto";
  package TEST;
  
  message FilePaths
  {
     repeated FilePath file_path = 1;
  }
  </code></pre>
  
  <p>I know how to create FilePath objects: </p>
  
  <p>As you can see, the FilePaths message uses several FilePath objects. I know how to create several FilePath objects using: </p>
  
  <pre><code>Google.Protobuf.Collections.RepeatedField&lt;FilePath&gt; filepaths = new Google.Protobuf.Collections.RepeatedField&lt;FilePath&gt;();
  filepaths.Add(fp1);
  filepaths.Add(fp2);
  filepaths.Add(fp3);
  filepaths.Add(fp4);
  filepaths.Add(fp5);
  </code></pre>
  
  <p>where fp1, fp2, fp3, fp4, and fp5 are FilePath objects I created earlier in code. I create the FilePaths object like this:</p>
  
  <pre><code>FilePaths fpTest = new FilePaths
  {
      Path = filepaths // ERROR HERE
  };
  </code></pre>
  
  <p>Visual Studio tells me that the field "Paths" of FilePaths is read-only, i.e., I only get a GET, not a SET. Is there anyway around this or a way to fix this? Basically I'm trying to create a FilePaths object that contains several FilePath objects. </p>