Autor Beitrag
flori112255
Hält's aus hier
Beiträge: 7



BeitragVerfasst: So 02.01.11 00:28 
Hallo Zusammen

ich bin ganz neu in c# und habe ein riesiges problem
und zwar:

ausblenden C#-Quelltext
1:
this.webBrowser1.Url = new System.Uri("http://mail.friesi.ch/user/index.php",[b]system[/b].UriKind.Absolute);					


in diesem text kommt bei system folgender fehler: Der Name "system" ist im aktuellen Kontext nicht vorhanden.

dabei hab ich den text nichtmal geschrieben dieser text kam von c# selbst :x :x

danke im voraus

Moderiert von user profile iconChristian S.: I- durch C#-Tags ersetzt
Kha
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3803
Erhaltene Danke: 176

Arch Linux
Python, C, C++ (vim)
BeitragVerfasst: So 02.01.11 00:49 
:welcome: in der EE!

user profile iconflori112255 hat folgendes geschrieben Zum zitierten Posting springen:
dabei hab ich den text nichtmal geschrieben dieser text kam von c# selbst :x :x
Das sicher nicht, denn System schreibt man wie jeden Namespace groß.

_________________
>λ=

Für diesen Beitrag haben gedankt: flori112255
flori112255 Threadstarter
Hält's aus hier
Beiträge: 7



BeitragVerfasst: So 02.01.11 13:50 
user profile iconKha hat folgendes geschrieben Zum zitierten Posting springen:
:welcome: in der EE!

user profile iconflori112255 hat folgendes geschrieben Zum zitierten Posting springen:
dabei hab ich den text nichtmal geschrieben dieser text kam von c# selbst :x :x
Das sicher nicht, denn System schreibt man wie jeden Namespace groß.


tut mir leid du hast recht jedoch kommt wenn ich es gross schreibe ein weiteres Problem : Test.Form1.System(string)" ist "Methode" und im angegebenen Kontext nicht gültig.

danke im voraus
Kha
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3803
Erhaltene Danke: 176

Arch Linux
Python, C, C++ (vim)
BeitragVerfasst: So 02.01.11 13:53 
Du darfst natürlich keine eigene Methode namens System haben, das kann nur Ärger geben. Benenne sie um, falls du sie nicht sowieso nur versehentlich angelegt hast.

_________________
>λ=
flori112255 Threadstarter
Hält's aus hier
Beiträge: 7



BeitragVerfasst: So 02.01.11 14:13 
in was soll ich es sonst umbenennen? hier das bild :
Moderiert von user profile iconKha: Bild angehängt
wie gesagt, das hab nicht ich geschrieben, als ich den webbrowser erstellt hab, hat c# das selbst geschrieben
Einloggen, um Attachments anzusehen!
Kha
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3803
Erhaltene Danke: 176

Arch Linux
Python, C, C++ (vim)
BeitragVerfasst: So 02.01.11 14:32 
Du hast irgendwo in der Form1-Klasse eine Methode namens System erstellt, die muss weg. Wo die ist, kann ich dir von hieraus schlecht sagen.

_________________
>λ=

Für diesen Beitrag haben gedankt: flori112255
flori112255 Threadstarter
Hält's aus hier
Beiträge: 7



BeitragVerfasst: So 02.01.11 14:58 
hier mein text:
ausblenden volle Höhe C#-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
namespace Claudia
{
    partial class Form1
    {
        /// <summary>
        /// Erforderliche Designervariable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Verwendete Ressourcen bereinigen.
        /// </summary>
        /// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Vom Windows Form-Designer generierter Code

        /// <summary>
        /// Erforderliche Methode für die Designerunterstützung.
        /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
        /// </summary>
        private void InitializeComponent()
        {
            this.webBrowser1 = new System.Windows.Forms.WebBrowser();
            this.button1 = new System.Windows.Forms.Button();
            this.button3 = new System.Windows.Forms.Button();
            this.button2 = new System.Windows.Forms.Button();
            this.SuspendLayout();
            // 
            // webBrowser1
            // 
            this.webBrowser1.Location = new System.Drawing.Point(1212);
            this.webBrowser1.MinimumSize = new System.Drawing.Size(2020);
            this.webBrowser1.Name = "webBrowser1";
            this.webBrowser1.Size = new System.Drawing.Size(1492549);
            this.webBrowser1.TabIndex = 0;
            this.webBrowser1.Url = new System.Uri("http://mail.friesi.ch/user/index.php",  system.UriKind.Absolute);            // 
            // button1
            // 
            this.button1.Location = new System.Drawing.Point(1242578);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(12883);
            this.button1.TabIndex = 1;
            this.button1.Text = "Mail.Gmx.ch";
            this.button1.UseVisualStyleBackColor = true;
            this.button1.Click += new System.EventHandler(this.button1_Click);
            // 
            // button3
            // 
            this.button3.Location = new System.Drawing.Point(1376578);
            this.button3.Name = "button3";
            this.button3.Size = new System.Drawing.Size(12883);
            this.button3.TabIndex = 3;
            this.button3.Text = "Schliessen";
            this.button3.UseVisualStyleBackColor = true;
            this.button3.Click += new System.EventHandler(this.button3_Click);
            // 
            // button2
            // 
            this.button2.Location = new System.Drawing.Point(1108578);
            this.button2.Name = "button2";
            this.button2.Size = new System.Drawing.Size(12883);
            this.button2.TabIndex = 4;
            this.button2.Text = "Dokumente";
            this.button2.UseVisualStyleBackColor = true;
            this.button2.Click += new System.EventHandler(this.button2_Click);
            // 
            // Form1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = .System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(1516673);
            this.Controls.Add(this.button2);
            this.Controls.Add(this.button3);
            this.Controls.Add(this.button1);
            this.Controls.Add(this.webBrowser1);
            this.Name = "Form1";
            this.Text = "Form1";
            this.Load += new System.EventHandler(this.Form1_Load);
            this.ResumeLayout(false);

        }

        #endregion

        private System.Windows.Forms.WebBrowser webBrowser1;
        private System.Windows.Forms.Button button1;
        private System.Windows.Forms.Button button3;
        private System.Windows.Forms.Button button2;
    }
}


Moderiert von user profile iconKha: I- durch C#-Tags ersetzt
Th69
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Moderator
Beiträge: 4798
Erhaltene Danke: 1059

Win10
C#, C++ (VS 2017/19/22)
BeitragVerfasst: So 02.01.11 16:08 
Das ist ja nur der vom VS generierte Code (Form1.designer.cs)?
Der Fehler muß in deinem eigenen Code (Form1.cs) liegen...
flori112255 Threadstarter
Hält's aus hier
Beiträge: 7



BeitragVerfasst: So 02.01.11 20:53 
alles was ich bisher selbst geschrieben hab ist:

ausblenden C#-Quelltext
1:
2:
    string url = "http://www.gmx.ch/";
            Process.Start(url);


und

Application.Exit();


hier mein ganzer text



ausblenden volle Höhe C#-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;

namespace Claudia
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string url = "http://www.gmx.ch/";
            Process.Start(url);
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void button2_Click(object sender, EventArgs e)
        {
            
    }

private void System(string p)
{
   throw new NotImplementedException();
}
}}


Moderiert von user profile iconChristian S.: I- durch C#-Tags ersetzt
Th69
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Moderator
Beiträge: 4798
Erhaltene Danke: 1059

Win10
C#, C++ (VS 2017/19/22)
BeitragVerfasst: So 02.01.11 21:07 
Hallo flori,

bitte benutze die [ cs ] / [ /cs ] - Tags (ohne die Leerzeichen).

Kha hat folgendes geschrieben:

Du hast irgendwo in der Form1-Klasse eine Methode namens System erstellt, die muss weg.


ausblenden C#-Quelltext
1:
2:
3:
4:
private void System(string p)
{
throw new NotImplementedException();
}

Na, siehst du es?
flori112255 Threadstarter
Hält's aus hier
Beiträge: 7



BeitragVerfasst: So 02.01.11 21:30 
user profile iconTh69 hat folgendes geschrieben Zum zitierten Posting springen:
Hallo flori,

bitte benutze die [ cs ] / [ /cs ] - Tags (ohne die Leerzeichen).

Kha hat folgendes geschrieben:

Du hast irgendwo in der Form1-Klasse eine Methode namens System erstellt, die muss weg.


ausblenden C#-Quelltext
1:
2:
3:
4:
private void System(string p)
{
throw new NotImplementedException();
}

Na, siehst du es?


eigentlich nicht :D