• I removed the www from the URL, please update your bookmarks and pay attention to the bottom of the screen if using Google Chrome to allow push notifications again.

Question: Field Initializer Error


New member
Apr 10, 2019
Programming Experience
Hello, my lack of C# is keeping me from trying to consume data in an SDK. I'm getting the error: A field initializer cannot reference the non-static view, method, or property ' connection1.connector
on my last line of code with (connector) being underlined with this error. Help appreciated.

My code thus far.
Code with issues:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VersionOne.SDK.APIClient;

namespace VersionOneExtract3
    public class Connection1
        V1Connector connector = V1Connector


    .WithUserAgentHeader("VersionOneExtract2", "1.0")

    .WithWindowsIntegrated("GA\\username", "password")


        IServices services = new Services(connector);
Top Bottom