Array
(
)

Error: member names cannot be the same as their enclosing type

Otton Moura
   - 11 nov 2009

Bom dia amigos, estou utilizando o vs 2008 .net 3.5, quando eu compilo meu projeto o seguinte erro é acusado: "informacoes":member names cannot be the same as their enclosing type  
Segue o codigo c# e html gerado.

using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; //SCAP using System.ComponentModel; using System.Drawing; using System.Web.SessionState; using PortusCommon; using CPD.Projetos.Porto.Pages.BaseAutPage; using SCAP; public partial class informacoes : BaseAutPage // System.Web.UI.Page { #region Public Object #endregion #region Private Methods #endregion #region Event Handlers protected void Page_Load(object sender, System.EventArgs e) { base.Page_Load(sender, e); lblPerfil.Text = Helper.RetornaPerfil(Usuario.GetCodigoPerfil().ToString()); lblUsuario.Text = Usuario.GetNomeUsuario(); lblDataHora.Text = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss"); } #endregion } 

Otton Moura
   - 11 nov 2009

Aew galera, valeu pela ajuda, mas eu já consegui fazer debugar sem erro.   Não sei explicar o erro ao certo, eu apenas troquei o meu c# e o meu html para esse aqui..   using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; //SCAP using System.ComponentModel; using System.Drawing; using System.Web.SessionState; using PortusCommon; using CPD.Projetos.Porto.Pages.BaseAutPage; using SCAP; public partial class Informacoes : BaseAutPage { #region Public Object #endregion #region Private Methods #endregion #region Event Handlers protected void Page_Load(object sender, EventArgs e) { base.Page_Load(sender, e); if (!IsPostBack) { lblPerfil.Text = Helper.RetornaPerfil(Usuario.GetCodigoPerfil().ToString()); lblUsuario.Text = Usuario.GetNomeUsuario(); lblDataHora.Text = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss"); } } #endregion } <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Informacoes.aspx.cs" Inherits="Informacoes" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>informacoes</title> </head> <body> <form id="informacoes" method="post" runat="server"> <div> <span id="span_informacoes"> <table width="100%" id="ParaImprimir"> <tr class="texto_campos"> <td width="50%" style="border-right: medium none; border-top: medium none; border-left: medium none; border-bottom: medium none"> <asp:Label ID="lblUsuario" runat="server"></asp:Label> / <asp:Label ID="lblPerfil" runat="server"></asp:Label> </td> <td width="50%" align="right" style="border-right: medium none; border-top: medium none; border-left: medium none; border-bottom: medium none"> <asp:Label ID="lblDataHora" runat="server"></asp:Label> </td> </tr> <tr class="texto_campos"> <td colspan="2" style="border-right: medium none; border-top: medium none; border-left: medium none; border-bottom: medium none"> &nbsp; </td> </tr> </table> </span> </div> </form> <script type="text/javascript" language="javascript"> window.parent.document.all["span_usuario"].innerText = window.document.all["lblUsuario"].innerText; window.parent.document.all["span_perfil"].innerText = window.document.all["lblPerfil"].innerText; </script> </body> </html>