PDA

View Full Version : مشکل کوچک و جدی خطا



mrcoder01
چهارشنبه 30 اردیبهشت 1394, 23:39 عصر
c# - wpf
خطا :

Error 1 Missing partial modifier on declaration of type 'Keyword_Search_Seo.frmShowResult'; another partial declaration of this type exists C:\Users\Erfan\Documents\Visual Studio 2013\Projects\test_wpf\Keyword Search SeoTm\Keyword Search Seo\frmShowResult.cs 13 18 Keyword Search Seo


و کد فرم :

using HtmlAgilityPack;
using Keyword_Search_Seo.Properties;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Reflection;
using System.Threading;
using System.Windows.Forms;
namespace Keyword_Search_Seo
{
public class frmShowResult : Form
{
public frmShowResult()
{
this.InitializeComponent();
}
public frmShowResult(string txtSite, string txtKey, int SearchIndex, int EndPage, bool chkProxy, string txtProxyIp, decimal txtProxyPort, string txtProxyUsername, string txtProxyPassword)
{
this.SearchIndex = SearchIndex;
//////////
}
public frmShowResult.GetReturn GetPlaceInGet(int StartPageID, string Text, string SiteName, string endpageid, bool isProxy, string Proxyip, decimal ProxyPort, string ProxyUsername, string ProxyPassword)
{
////////
}
private void frmShowResult_Load(object sender, EventArgs e)
{
/////////
}
}
}

slazenger
پنج شنبه 31 اردیبهشت 1394, 06:48 صبح
دو پاسخ برای این سوال وجود داره : بررسی پاسخ 1 :

1: آیا از MVC استفاده میکنید بهمراه EF4 اگر بله کدام ورژن MVC
بررسی راه حل 2 :

2: بدلیل استفاده 2 کلاس همنام حتی اگر در 2 لایه جدا UI AND LOGIC باشند باید یکی رو از Public به Public Partial تغییر بدید

ممنون

RmeXXXXXXXXX
پنج شنبه 31 اردیبهشت 1394, 23:34 عصر
مشکل اینجاست:
public class frmShowResult : Form
توی تعریف کلاس کلمه کلیدی partial رو حذف کردین
بدین صورت بنویسین:
public partial class frmShowResult : Form