using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.IO;
using System.Xml;
namespace DevHoleDemo
{
class Program
{
static void Main(string[] args)
{
DocLibHelper docLibHelper = new DocLibHelper();
Dictionary<string, object> properties = new Dictionary<string, object>();
properties.Add("Title", "Test Title");
//Create or overwrite text file test.txt in 'Docs' document library creating folder 'Test Folder' as required.
docLibHelper.Upload("http://localhost/Docs/Test Folder/test.txt", System.Text.Encoding.ASCII.GetBytes("Test text."), properties);
}
}
public class DocLibHelper
{
ListsService.Lists m_listService;
ICredentials m_credentials;
ListInfoCollection m_lists;
public DocLibHelper()
{
m_credentials = CredentialCache.DefaultCredentials;
m_listService = new ListsService.Lists();
m_listService.Credentials = m_credentials;
m_lists = new ListInfoCollection(m_listService);
}













