|
Sir/Madam,
Can somebody please provide the help with the help of an easy example how to differentiate between
Protected
Internal
Internal protected
Please help.
Thanks and regards
Pankaj Garg
|
|
|
|
|
Protected means that only derived classes can see it
internal means that only classes inside the current assembly can see it.
Protected Internal would mean that only derived classes within this assembly can see it.
'Problem' is not a very useful header.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Sir,
Sorry for the irrelevant header.
Next time i will take care for it.
Can u please explain with example the difference b/w internal and internal protected.
Thanks and regards
Panakj
|
|
|
|
|
internal:
Access is limited to the current assembly.
protected internal:
Access is limited to the current assembly or types derived from the containing class.
Regards,
Satips.
|
|
|
|
|
Hi,
Here an example.
U have 2 dlls : DLL1 and DLL2.
In DLL1 u have a class Employee with a method Fire()
In DLL2 u have a class Boss.
1- if u declare the Fire method as protected, in the boss class u can invoke the Fire method and U cannot invoke the fire method anywhere else the Boss class
2- if u declare it as Internal : u can invoke the fire method anywhere in DLL1 but not in DLL2. U cannot also view the method in the Boss class (because it's in the DLL2)
3- If u declare it as Internal protected, u can only invoke the method from a class inheriting from Employee located in the DLL1.
HTH.
Hayder Marzouk
|
|
|
|
|
Hi all,
I am trying to add .dll file as a reference in my C#.NET application but i am getting error i.e.
A reference to 'C:\STAF\bin\STAF.dll could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component.
Is there any other way out to add dll into C# or no. Because what i am doing is
Project->Add Reference->Browse->*.dll
Thanks
|
|
|
|
|
Sounds like it's not a .NET dll, and not a COM dll. You can call it's methods via pinvoke.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
I have to add multiples into a dataset. Using this dataset i am creating a crystalreport. How to add the tables into a dataset. I am getting error in the report.
the code is as follows...
string strConn = "data source=HP10503715219;persist security info=False;initial catalog=MOHAM;pwd=sa;user id=sa";
SqlConnection sqlConn = new SqlConnection(strConn);
DataSet ds = new DataSet();
strCmd = select cm.name, om.oclientref, pm.productname, om.orcvddatetime, od.opastatecode, cu.countyname, om.ordercost, om.additionalcost,om.total,om.subclient from ordermain om, orderdetail od, clientmaster cm, countyusa cu, productmaster pm where cm.clientid = om.oclientid and pm.productid = om.oproductid and cu.countycode = od.opacountycode and om.oslno = od.oslno and (om.ostatus='Completed' or om.ostatus='sent to client');
SqlDataAdapter da = new SqlDataAdapter(strCmd, sqlConn);
da.Fill(ds);
ds.Tables[0].TableName = "ordermain";
ds.Tables[1].TableName = "productmaster";
ds.Tables[2].TableName = "clientmaster";
ds.Tables[3].TableName = "countyusa";
ds.Tables[4].TableName = "orderdetail";
sqlConn.Close();
CrystalReportViewer1.DisplayGroupTree = false;
CrystalReportViewer1.HasCrystalLogo = false;
myReportDocument.Load(Server.MapPath("Total.rpt"));
myReportDocument.SetDataSource(ds);
CrystalReportViewer1.ReportSource = myReportDocument;
CrystalReportViewer1.DataBind();
ERROR: System.IndexOutOfRangeException: Cannot find table1
thanx in advance
yamini
|
|
|
|
|
According to ur select query u r selecting data from five different tables
which is coming to one table in dataset.so ur data set contains only one table
and u r trying to set table name property of more than one table that is why u r getting this error so remove following lines from ur codes.
ds.Tables[1].TableName = "productmaster";
ds.Tables[2].TableName = "clientmaster";
ds.Tables[3].TableName = "countyusa";
ds.Tables[4].TableName = "orderdetail";
rahul
|
|
|
|
|
If i remove from there , then how and where shall i include the table names to the dataset.
yamini
|
|
|
|
|
As i have explained that ur dataset contains only one table so u can give name to this table only like
ds.Tables[0].TableName = "XYZ";
rahul
|
|
|
|
|
Hi,
I need to access MDI parent data from MDI child form. How can i do that?
Thx,
Nuno
|
|
|
|
|
The Child Form has a property called MDIParent, this will return your MDI Parent Form as a Form object.
Because it is returned as a Form object you can only access the properties and methods that the Form class defines.
To access the methods and properties you have created on your MDI Parent Form you need to cast the MDIParent object as the type of your MDI Parent Form.
i.e.
MyMDIParentForm mdiParentForm = (MyMDIParentForm)this.MdiParent;
MyMDIParentForm needs to be replaced with the class name of your MDI Parent Form. This will then give you access to all it's properties and methods.
|
|
|
|
|
Hi,
Ok. I have tried that but i'm not having good results.
<br />
MessageBox.Show("I'm here");<br />
Coordinator c = (Coordinator)this.MdiParent;<br />
MessageBox.Show(c.Layouts.Count.ToString());<br />
I'm sure that the routine is called because the first message box is displayed.
However c.Layouts has elements but the message box doesnt even open. Layouts is a exposed property from the main class, in this case a listbox.
Any tips?
Nuno
|
|
|
|
|
hi ....
i wanto write an application that login to my yahoo messanger id that list all my friend list.
how can i do that
|
|
|
|
|
Go to the Yahoo site and look for their documentation on how their program works.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
What you tried for this?
What error you got?
tell your error and problem ? we are here to solve your problem?
Regards,
Satips.
|
|
|
|
|
dear im in trouble of how comand in c#.net to run an exe file in a C#.net program .. i anyone knows pls let me know sooner
thanks
thushara
|
|
|
|
|
Hello,
System.Diagnostics namespace contains the Process and ProcessStartInfo class.
the Process class contains a Start method.
This should help you.
All the best,
Martin
|
|
|
|
|
Refer to Process class.
Use this method[^]
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
System.Diagnostics.Process.Start(@"C:\YourFilePath\YourFile.exe");
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Always gotta love the third person who feels they need to give the same answer....
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
I'm sorry and I know it's totally unprofessional but take a hint from the guy's post title "ch#.net"
I though he needs a working code snippet instead of reading about some class documentation.
Christian Graus wrote: Always gotta love the third person
Thanks, I love you tooChristian
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Muammar© wrote: Thanks, I love you tooChristian
My point is always to wait for an answer with at least a sign of "tried it myself and failed" statement!
All the best,
Martin
|
|
|
|
|
Hi all. I have an application with two listviews that implement drag and drop (cod from this site), and when I'm dropping an item in the other listview, I need to get the address of the listview where the drag began.
I have an event: protected override void OnDragDrop(DragEventArgs drgevent)
How can I get, from drgevent, the listview who is the father of the control?
Regards,
Diego F.
|
|
|
|