|
Nice, that you explain it! Got my '5'
|
|
|
|
|
|
Looks like someone has no humor!
|
|
|
|
|
Hello,
asif_aslam wrote: why we using properties
As this question is not very clever asked, you will only get useless answers.
So try to make a full question, like:
Why should we use properties instead of methods (getmethod and setmethod)?
Or is it something else you meant?
All the best,
Martin
|
|
|
|
|
Think about properties as about smart fields. They can do checks for correct input, work with some cache etc... Under the hood, properties are just "syntactic sugar", language feature allowing two methods with get value/ set value sematics look like a field.
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
"Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
Because we Americans (well, United Statesians, no offense intended toward our neighbors) tend to be rabid possessive consumers.
-- modified at 15:19 Thursday 21st June, 2007
Oh, and... Because we're not pinko commies!
|
|
|
|
|
I must admit that my english (or maybe slang) is too bad to understand that.
But I'm curious, and would like to get the joke (I guess).
I also know that it might not be funny any more, if you have to explain it with other words, but give it a try please.
All the best,
Martin
|
|
|
|
|
|
string TextIDidNotUnderstand = YourText.Remove("Because we");
I would really need a conversion of the whole text I think!
Thanks
Martin
|
|
|
|
|
Not worth the trouble... move along... move along...
|
|
|
|
|
Friends
I have a Visio file having an ERD of a database with complete info, now I want to read that file to create a database using C#, any idea or suggestion
Thanks for your guidance
MARKZAI
|
|
|
|
|
please post solutin to this, i need to read a visio file and print its node (shape) in a text file order wise.
ravidhingra89@gmail.com
|
|
|
|
|
hi guys
i want to get all groups and useer information from active directory and also
to update these users in erms of their right on files and folders, using c#.net
any help,
thanks
best regards
hello
|
|
|
|
|
|
Dears,
I have a web application and i want to print the report as Landscape automaticaly form the code.
I tried to use the follwing code but it was change the page setting not the printer setting
oRpt.PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.Landscape;
Thank and best regards
Abu Asseel
|
|
|
|
|
Asalam-o-Alaikum:
I have created details view in c# but getting little defficulty in updating the row.
can anybody help me how i can get new values in ItemUpdating() function.
Thanx
|
|
|
|
|
Hi,
I have a SDI application.
I want to drag and drop between two components. One of them is in the SDI main form, and the second one is in the second form.
Its seems that there is no reaction to the dragdrop event.
Is there any trick to do it?
Thx,
Nuno
|
|
|
|
|
|
Hi,
I have a dataset, how can i convert this dataset to a List<t> or an object
|
|
|
|
|
sangramkp wrote: I have a dataset, how can i convert this dataset to a List or an object
Strictly speaking, a DataSet is already an object.
What do you want to list? A dataset contains many tables, which contain many rows, which contain many columns?
List<DataTable> tables = new List<DataTable>();
foreach(DataTable table in myDataSet.Tables)
{
tables.Add(table);
}
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Ready to Give up - Your help will be much appreciated.
My website
|
|
|
|
|
Actually I have a dataset having 1 table(tblScreens) which in turn have 3 columns.
Now I want to store the screen information in to a List<screen> (*Screen is a class having properties) so that the members can be retrived from the UI.
|
|
|
|
|
Create a list of your Screen class:
List<Screen> list = new List<Screen>();
Loop through the rows and create Screen objects and add to the list:
foreach (DataRow row in someDataSet.Tables["tblScreens"].Rows) {
Screen screen = new Screen(row["someField"], row["someOtherField"], row["anotherField"]);
list.Add(screen);
}
[Disclaimer: The code is not tested, and may have minor errors.]
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi ur code is almost optimum but at the last moment i.e on the row
Screen screen =new screen(row[],.....)
*it gives an error showing Error No overload for method 'Screen' takes '3' arguments
Help me if u can ....
|
|
|
|
|
I have no idea how your Screen class is built. I assumed that if you have a class with three properties, you would have a constructor with three arguments to create an instance of the class and populate the properties, i.e something like:
public class Screen {
private int _propert1, _property2, _property3;
public Screen(property1, property2, property3) {
_property1 = property1;
_property2 = property2;
_property3 = property3;
}
public int Property1 { get { return _proeprty1; } }
public int Property2 { get { return _proeprty2; } }
public int Property3 { get { return _proeprty3; } }
}
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi,
My screen Class looks like this
namespace Screen
{
public class Screen
{
int screen_id;
string screen_name;
int screen_capacity;
public int ScreenId
{
get { return screen_id; }
set { screen_id = value; }
}
public string ScreenName
{
get { return screen_name; }
set { screen_name = value; }
}
public int ScreenCapacity
{
get { return screen_capacity; }
set { screen_capacity = value; }
}
}
}
|
|
|
|