|
Thanks. I was actually asking whether such functionality initially existed. Meanwhile, I wrote some functions (similar to yours but not exactly the same), which you can check here[^].
|
|
|
|
|
Hi,
How can i call C# managed code in VB? , Will it allow me to access all CLR properties?
Thanks
|
|
|
|
|
you can reference the C# dll from your VB project and I have no idea what you mean by CLR properties. Whatever you expose in your code is available.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
VB or VB.net?
If it is VB, you need to realize the COM object.
If it is VB.net, just add the reference to project.
Tan Li
I Love KongFu~
|
|
|
|
|
The .Net compiler produces "intermediate language code" from the higher-level language, which is for example C# or VB.Net. This intermediate language code is common to all languages, and this is the code that actually gets executed by the framework. Therefore, if you compile a C# project, it just becomes a .Net assembly; it is almost an executable, it is not your text source file anymore. From the moment that you reference it in your VB.Net project, it becomes available to your VB.Net code as if it was written in VB.Net.
Jean-Christophe Grégoire
|
|
|
|
|
public int MyFunction( int a, int b)
{
if (a<= 0)
return (0);
---------------
Other codes
---------------
return (0)
}
Since a=0, the first return(0) is executed, and then it move to second return(0). Why other function inside "Other code" is skipped?
Thanks
|
|
|
|
|
It doesn't "move to second return" - why should it?
return exits the function and returns a value to the caller. It's the last instruction that's being excecuted (apart from enclosing finally blocks).
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
becouse the moment return statement is excecuted the control is shifted back to callin place.
rahul
|
|
|
|
|
It doesn't move to the second return.
When you debug, it shows at the end of the function.
This is why you are probably thinking it has moved to the second return.
«_Superman_»
|
|
|
|
|
It is skipped because the code is designed to do that.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
dec82 wrote: Why other function inside "Other code" is skipped?
Why not?
Tan Li
I Love KongFu~
|
|
|
|
|
Hi,
How to check that a textbox contain only spaces.
How to trim all the space after the string. String.Trim() only clear one space after the charecter in c#
Regards,
YPKI
|
|
|
|
|
Not true. String.Trim() will clear all leading and trailing spaces in the string.
«_Superman_»
|
|
|
|
|
ypki wrote: How to check that a textbox contain only spaces.
There are many ways, but they all end up looping through the string in some way or the other to check each character.
For example, in framework 3.5 you can use extension methods. The string implements IEnumerable<char>, so you can use the All method to enumerate the characters and check a condition for each character:
string text = " ";<br />
bool allSpaces = text.All(c => c == ' ');
ypki wrote: How to trim all the space after the string. String.Trim() only clear one space after the charecter in c#
No, it doesn't. It removes all white space characters at the beginning and at the end of the string.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
string s = "ad df d a ";
string s1= s.Replace(" ", "");
Tan Li
I Love KongFu~
|
|
|
|
|
return txtBox.Text.Trim().Length == 0;
|
|
|
|
|
hello All,
I have created a WCF Application.now i want to integrate the Logging Application Block.
i want to Log them into a txt file as well. (this is my main concern).
when doing so much googling i find out about Flatfilelistner and i configured my App.config using following Listner but it didn't work for me.
<add fileName="D:\trace.log" header="----------------------------------------"
footer="----------------------------------------" formatter="Text Formatter"
listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
traceOutputOptions="Callstack" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
name="FlatFile TraceListener" />
can any one please guide me to resolve this problem.
Amit Agarwal
|
|
|
|
|
Amit Agarrwal wrote: but it didn't work for me.
You'll have to give a little more than this. What didn't work? Did you get exceptions? Did the file not write?
only two letters away from being an asset
|
|
|
|
|
Dear All,
I want web browser dll control ..(only web control not window control)
Sir/Mam,
I'm Kannan.I Like very much for the coding for the project
THANKNG YOU
KANNAN
|
|
|
|
|
A "webbrowser"-control, for ASP.NET instead of WinForms? That doesn't exist. How would you render a browser in an HTML-page?
Isn't it (a lot!) easier to use a in your HTML?
I are troll
|
|
|
|
|
Thank u very much Eddy Vluggen
Sir/Mam,
I'm Kannan.I Like very much for the coding for the project
THANKNG YOU
KANNAN
|
|
|
|
|
dear friends pls help me in this
wats the equalent operator for
1.this pointer ->
2. scope resolution operator ::
3. pointers
4.arrays
5. matrix
6.memory allocation and free up
pls explain with example codes
|
|
|
|
|
this-> becomes this.
:: becomes .
pointers can be used with the unsafe keyword and is still *, but not recommended as garbage collection will be effected
arrays are the same [] but is written as string[] s = new string[3];
by matrix if you mean 2 dimensional arrays then they are declared as string[,]
there is also something called jagged arrays - string[][]
memory allocation is using new
free up happens through the garbage collector (automatic)
«_Superman_»
|
|
|
|
|