|
Sir,
I want to know something about the internal keyword and how it is different from the private keyword and one more questions please that is what is the difference between internal and protected internal.
Thanks
|
|
|
|
|
Internal is visible only to items inside the assembly. Protected internal is only visible to derived classes within the assembly.
Christian Graus - C++ MVP
|
|
|
|
|
Actually, 'protected internal' is visible to all derived classes and everywhere within the assembly. It is "protected OR internal", not "protected AND internal".
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C# to C++ converter, VB to C++ converter
Instant Python: VB to Python converter
|
|
|
|
|
Hi
can someone tell me how can i define my own file format. i mean a custom file format which no other application can read and which can also not be opened in any readable form. like we can open some files in notepad or wordpad, and so we can read everything in that file. i want that my custom file format can not be read in that way too. can someone guide me please.
regards
sAqIb
"Our scientific power has outrun our spiritual power. We have guided missiles and misguided men."
Dr. Martin Luther King Jr.
|
|
|
|
|
A noetpad file is just plain text.
Your question makes no sense. How can we tell you how to store stuff that you've not defined ? You can make up any file format you like, and if it's more complex than plain text, no other app will open it, simple as that.
Christian Graus - C++ MVP
|
|
|
|
|
but how can i make that file format? by just giving a self defined extension? or there is some way to do that?
sAqIb
"Our scientific power has outrun our spiritual power. We have guided missiles and misguided men."
Dr. Martin Luther King Jr.
|
|
|
|
|
What are you asking ? Do you want your file to open when it's double clicked ? That's a registry entry ( easily found with google ). Do you just want to create the file ? ( Just use the System.IO namespace, and all the info you'd find with google ) Do you want to know the specifics of a file format for your app ? We really can't tell you.
Christian Graus - C++ MVP
|
|
|
|
|
I am a new c# programmer. I am trying to understand ADO.NET. can anybody explain, how can store SQL Connection string in a text file or web.config file and how to call that in c#?
wMan
|
|
|
|
|
|
Hi...
How i can select all items in a CheckedListBox on selction of a first CheckedListBox item...?
Items in CheckedListBox are as follows-
'Selct All'
First Item
Second Item
Third Item
So on click of 1st CheckedListBox item(SelectAll), i want to select all items...How i can do this...?
Thanks in adavnce,
Vinay
|
|
|
|
|
This is bad UI. You can make it work, but select all should be a button, not one of the items in the list.
Christian Graus - C++ MVP
|
|
|
|
|
Christian Graus wrote: This is bad UI.
Not sure I agree with that. If you have a huge field of checkboxes, say to determine which fields to search on, one of the options could be All, which would select all of the checkboxes for you.
I've seen this done out in the wild, and it seems to make sense. Not saying there's not a better way, just saying I don't think it's a bad UI.
[edit]Ahh, it's a list box. Should have read that a little closer. I agree with Christian, use a button.[/edit]
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
I have to make this type of application....
since that is the requirement...so can u tell me ...
How i can do this...?
Regards,
Vinay
|
|
|
|
|
You absolutely must have a list of checkbox items, and the first item must say 'select all' ? A button is a better choice . But, if you must make a god awful UI, just handle the event for an item to be checked, check if it's the 'check all' item, and if it is, check them all.
Christian Graus - C++ MVP
|
|
|
|
|
Ok...Can u tell me if i give a single CheckBox(say 'Selct All') outside this CheckBoxList then How i can select all ites in CheckBoxList on selction that CheckBox(Selct All).
Thanks for all your replies,
Vinay
|
|
|
|
|
If there's no CheckAll method on the checkboxlist, use foreach on the items collection to check them all.
Christian Graus - C++ MVP
|
|
|
|
|
Hi..
Actually i dont know number of items are there in that CheckBoxList so can you tell me how i can use foreach loop for my CheckBoxList. How i'll get collection of items in that CheckBoxList.
Regards,
Vinay
|
|
|
|
|
Do you not know how for each works ?
foreach(CheckBoxListITem item in myBox.Items)
{
item.Checked = true;
}
I am sure that's not the type of the items, but that's how it looks.
Christian Graus - C++ MVP
|
|
|
|
|
you can you this too
<br />
for (int i = 0; i < this.checkedListBox1.Items.Count; i++)<br />
{<br />
this.checkedListBox1.SetItemChecked(i, true);<br />
}<br />
Regards
Shajeel
|
|
|
|
|
It doesn't matter what it is, having a check box that says 'select all' makes no sense, it should be a seperate control to the type of control that is being selected ( and probably a button )
Christian Graus - C++ MVP
|
|
|
|
|
My example doesn't say "Select All" it just says All like:
Which fields do you want to search:
[ ] All
[ ] Author
[ ] Text
[ ] Date
[ ] Etc.
Granted you could write the same thing with radio buttons or something, like:
( ) All
( ) Selected
[ ] Author
[ ] Text
[ ] Date
[ ] Etc.
But I'd say the first one makes equally as much sense to most users, especially when it selects all the other check boxes.
It's just a shortcut, in either case.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Hello Everyone,
I am trying to pass two dates to a stored procedure in SQL server. I only require the date protion of the input not the time, but I cannot seem to get the formatting to just mm/dd/yyyy
the data is collected from two text boxes on a web form and is imput as string in the format mm/dd/yyyy.
The SP is expecting datetime parameters.
I have tried so many variations to this I am wondering if it can even be done????
DateTime FromDate = DateTime.ParseExact(tempdt, "mm/dd/yyyy", System.Globalization.CultureInfo.InvariantCulture);
DateTime Todate = Convert.ToDateTime(ToDateLbl.Text);
None of these work.
All help grealy accepted.
|
|
|
|
|
Jagannatha108 wrote: DateTime FromDate = DateTime.ParseExact(tempdt, "mm/dd/yyyy", System.Globalization.CultureInfo.InvariantCulture);
Change "mm/dd/yyyy" to "MM/dd/yyyy"
|
|
|
|
|
Sorry Jon, this still did not format my date to MM/DD/YYYY.
string tempfrmdt = FromDateLbl.Text;
string tmptodte = ToDateLbl.Text;
DateTime FromDate = DateTime.ParseExact(tempfrmdt, "MM/dd/yyyy", System.Globalization.CultureInfo.InvariantCulture);
DateTime Todate = DateTime.ParseExact(tmptodte, "MM/dd/yyyy", System.Globalization.CultureInfo.InvariantCulture);
Retuned the date as mm/dd/yyyy hh:mm:ss, not what I need.
Thanks for the suggestion though.
|
|
|
|
|
So, essentially you just need a string representation of the DATETIME parameters in the sproc? You can just use the CONVERT() T-SQL function to do that.
SET @varcharFromDate = CONVERT(VARCHAR(10), @FromDate, 101)
SET @varcharToDate = CONVERT(VARCHAR(10), @ToDate, 101)
Is that what you're asking? If not, then I'm not exactly clear on what the problem is.
|
|
|
|