|
Er nikesh yadav wrote: please provide me code in c#
We cannot do your work.
What you have done so for about this array code.
What error it shows?
Here you can get help only.
Regards,
Satips.
|
|
|
|
|
Hey try something yourself , if u r programmer dont ask for silly mistakes. or error.
Regards
Chintan
www.visharadsoft.com
(Nothing is so purify as KNOWLEDGE)
|
|
|
|
|
Hi
I m working in VS2005 C# Windows Application.I have created a .DLL file and added reference in my application.I have also copied the .PDB(Progam Debug Database) file with DLL .Its working fine but when i debug code it does not show the code of .DLL.Orginal code is on any other computer and compiled on that. i have copied .DLL and .PDB files.When i click F11 for going into .DLL code from my application it gives error "There is no source code available for the current location".
ANy body have Idea how to view code???Can i view code if i have .DLL and .PDB file but not original code????
|
|
|
|
|
If you don't have the code, how do you expect to see it? Your best bet is to use a disassembler. Check out Reflector[^]
AFAIK, you can't integrate it with the debugger.
Cheers,
Vıkram.
After all is said and done, much is said and little is done.
|
|
|
|
|
reply me on my e-mail majidkhan50@gmail.com
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
|
|
|
sk007msc wrote: reply me on my e-mail majidkhan50@gmail.com
Dont expect someone to reply you on your email? This is not a support desk
|
|
|
|
|
|
Is it like this
string list[34]=new string;
|
|
|
|
|
|
|
No.
It is like it says it is in every book on C# and in almost every example on CodeProject.
|
|
|
|
|
string[] str= new string[100];
Regards
Chintan
www.visharadsoft.com
(Nothing is so purify as KNOWLEDGE)
|
|
|
|
|
hi
I have created one method createdropdown()in that i had create one dynamic dropdownlist and in selectindexchange of that dropdownlist i had created another dynamic dropdownlist and again selectedindexchange of the second dropdown .
but when i run this code it will call first selectedindexchange when i select the dropdownvalue but it want call second selectedindexchange.
i had done autopostBack=true for both the dropdownlist.
Please Help It is some urgent Task that i have to complet.
in the below ddl_SelectedIndexChanged() is call but ddl2____SelectedIndexChanged is not fired.....?
// Add DropDownList Control to Placeholder
private void CreateDropDownBoxes()
{
//int counter= Convert[ViewState ("counter"),Int32];
for (int counter = 0; counter <= NumberOfControls; counter++)
{
DropDownList ddl = new DropDownList();
ddl.ID = "DropDownList_ID" + (counter + 1).ToString();
ddl.AutoPostBack = true;
ddl.AppendDataBoundItems = true;
ddl.SelectedIndexChanged += new EventHandler(ddl_SelectedIndexChanged);
DataTable dt = new DataTable();
dt = getdata_workspace();
ddl.DataSource = dt;
ddl.DataTextField = "displayedname";
ddl.DataValueField = "id";
ddl.DataBind();
phDropDownLists.Controls.Add(ddl);
phDropDownLists.Controls.Add(new LiteralControl("
"));
}
}
public void ddl_SelectedIndexChanged(object sender, EventArgs e)
{
int n = this.NumberOfControls;
for (int i = 0; i < n; i++)
{
SqlConnection conn = new SqlConnection(connStr);
string boxName = "DropDownList_ID" + (i + 1).ToString();
DropDownList ddl2_ = phDropDownLists.FindControl(boxName) as DropDownList;
DropDownList ddl2___ = new DropDownList();
ddl2___.ID = "DropDownList__" + (i + 1).ToString();
ddl2___.AutoPostBack = true;
ddl2___.AppendDataBoundItems = true;
ddl2___.EnableViewState = true;
SqlCommand cmd = new SqlCommand("select * from unit where workspaceid='" + ddl2_.SelectedValue + "'", conn);
conn.Open();
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
ddl2___.Items.Add(dr.GetString(2));
}
// ddl2___.EnableViewState = true;
ddl2___.SelectedIndexChanged += new EventHandler(ddl2____SelectedIndexChanged);
ddl2___.DataTextField = "displayedname";
ddl2___.DataValueField = "id";
phTextBoxes.Controls.Add(ddl2___);
phTextBoxes.Controls.Add(new LiteralControl("
"));
}
// throw new Exception("The method or operation is not implemented.");
}
void ddl2____SelectedIndexChanged(object sender, EventArgs e)
{
int n = this.NumberOfControls;
for (int i = 0; i < n; i++)
{
SqlConnection conn = new SqlConnection(connStr);
string boxName = "DropDownList__" + (i + 1).ToString();
DropDownList ddl2_ = phTextBoxes.FindControl(boxName) as DropDownList;
DropDownList ddl2___ = new DropDownList();
ddl2___.SelectedIndexChanged += new EventHandler(ddl2____SelectedIndexChanged);
ddl2_.ToolTip = "ddl2";
SqlCommand cmd = new SqlCommand("select * from unitoperation where workspaceid='" + ddl2_.SelectedValue + "'", conn);
conn.Open();
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
ddl2___.Items.Add(dr.GetString(3));
}
phdropdown3.Controls.Add(ddl2___);
}
}
Please Help ...Help...
|
|
|
|
|
advice 1:do not post whole project in the forum, its irritating, only post the code which u feel as doubtful.
advice 2: ur naming convention according to the above code is very very bad.
(such as ddl___SelectIndex...).
dude:if u wanna quick result for ur problem, follow the advice.
Regards
Chintan
www.visharadsoft.com
(Nothing is so purify as KNOWLEDGE)
|
|
|
|
|
i just created an addin in VS 2005. The addin uses different dll files and icons and the final product when run i got is the addin file and the dll file. now i want that addin to be used in other machines too and just copying the dll and addin is not just a solution (as it requires other dll and the icons).
can anyone help me out, how to make that possible?
Thanks in advance.
Your life is what your thoughts make it.
|
|
|
|
|
Hi,
I have created a Windows Component class(in C#) which will be used by the other developers in their application during the design time. The developers will add the component into the tool box by adding the reference to it. Later they drag and drop the copmponent on the Windows form.
I needed the component in such a way that the developer could add the collection items into it. So I have inherited the CollectionEditor class in the component.
Am able to add the collection items into the collection editor. But am not getting the added items back when I close the windows application and open it again.ie., it doesn't appear to be assigning the added items to the actuall collection in the form's InitializeComponent() function.
> Can you please suggest me some solution.
"Don't go the way life takes you…... Take the life the way you go……….."
|
|
|
|
|
Hi
Is it possible to prevent accessing a method in derived class? Since "sealed" keyword is only used along with "override" I can not use this option in the base class.
Thanks,
Diana.
|
|
|
|
|
private methods cannot be overridden.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
Diana Fernandez wrote: Is it possible to prevent accessing a method in derived class?
Yes. Go with Private Access Modifier.
Regards,
Satips.
|
|
|
|
|
Consider the scenario given below
public class Base
{
protected string _name = null;
public void SetName(string Name)
{
_name = Name;
}
}
public class Derived : Base
{
public void SetName(string Name, bool Condition)
{
if (Condition)
_name = Name + "true";
else
_name = Name + "false";
}
}
How is it possible to prevent accessing the Base class method on the object of derived class? Because base class implementation should not be used on the object of derived class.
|
|
|
|
|
Hello,
in this case you should declare it as virtual und override method.
public class Base
{
protected string _name = null;
protected virtual void SetName(string Name)
{
_name = Name;
}
}
public class Derived : Base
{
protected override void SetName(string Name, bool Condition)
{
if (Condition)
_name = Name + "true";
else
_name = Name + "false";
}
}
All the best
Martin
|
|
|
|
|
That will not compile, the method signatures differ.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Uuupss,
Haven't seen that.
than the 'new' would be best todo I think.
public new void SetName(string Name, bool Condition)
{
if (Condition)
_name = Name + "true";
else
_name = Name + "false";
}
}
All the best,
Martin
|
|
|
|
|
Diana Fernandez wrote: Because base class implementation should not be used on the object of derived class.
It's a feature of OO ( and the whole point of inheritance ) that derived classes DO inherit the base methods. The best you could do is make SetName virtual on the base class, and override it on the derived, so it calls the new method with a default condition, or have it throw an error.
public override SetName(string Name)
{
SetName(name, true);
}
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|