Přidat otázku mezi oblíbenéZasílat nové odpovědi e-mailem C# problem, jak to zpravit?

Ahoj lidičky,
nevíte jak zpravit chybu?

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Windows.Forms;

namespace Downloader
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        public string working_directory = Directory.GetCurrentDirectory()+"/text.txt";
        System.IO.StreamReader file = new System.IO.StreamReader([b]working_directory[/b]);
        ...
    }
}
Jsou zobrazeny jen nové odpovědi. Zobrazit všechny
Předmět Autor Datum
Jaku chybu?
MM.. 11.12.2015 17:39
MM..
Zde: System.IO.StreamReader file = new System.IO.StreamReader(working_directory);
Uragano 11.12.2015 17:42
Uragano
Akú hodnotu má tá Tvoja premenná working_directory? Skús si ju vypísať (predtým, než s ňou chceš nie… nový
pme 11.12.2015 17:48
pme
Tipujem ze tam strkas nejaky kod (t.j. ten cely riadok) uplne mimo funkcie. (on ti to tam pise ze co… poslední
MM.. 11.12.2015 17:48
MM..

Zpět do poradny Odpovědět na původní otázku Nahoru